home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / doc / manual < prev   
Encoding:
Text File  |  1996-09-27  |  242.2 KB  |  7,038 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                           Origami
  11.                          User Guide
  12.  
  13.  
  14.                        Michael Haardt
  15.            u31b3hs@pool.informatik.rwth-aachen.de
  16.  
  17.                    Rtscherstrae 155/1703
  18.                         52072 Aachen
  19.                           Germany
  20.  
  21.  
  22.                           _A_B_S_T_R_A_C_T
  23.  
  24.           This document describes all the functions  of
  25.      Origami  and  the syntax and semantics of its con-
  26.      trol language OCL.  The first part describing  the
  27.      Origami  commands  is  intended  to be read by new
  28.      users, who need more than just  a  description  of
  29.      bindings  as  given  in  the reference cards.  The
  30.      second part is intended for OCL  programmers.   It
  31.      is  very  usefull  if  you would like to create or
  32.      modify bindings.  This document assumes  that  you
  33.      are   familiar   with   the  folding  concept,  as
  34.      described in the introduction manual.
  35.  
  36.  
  37.  
  38.  
  39.  
  40.                           Contents
  41.          1  Using Origami .....................    4
  42.          1.1  Getting Started .................    4
  43.          1.2  The Screen Format ...............    5
  44.          1.3  The Special Editor Buffers ......    6
  45.          1.4  Processing Origami Files ........    7
  46.          1.5  Inmos Files .....................    8
  47.          2  All Origami functions .............    9
  48.          2.1  Moving around ...................    9
  49.          2.2  Folding .........................    9
  50.          2.3  Editing .........................   12
  51.          2.4  Search and replace ..............   14
  52.          2.5  Files ...........................   15
  53.          2.6  Macros ..........................   18
  54.          2.7  Shell commands ..................   19
  55.          2.8  Arguments .......................   19
  56.          2.9  Special functions ...............   19
  57.          2.10  How to get out .................   25
  58.          3  Programming in OCL ................   25
  59.          3.1  Resource files ..................   25
  60.  
  61.  
  62. Origami 1.6.92             - 1 -                October 1993
  63.  
  64.  
  65.  
  66.  
  67.  
  68. User Guide                 - 2 -
  69.  
  70.  
  71.          3.2  OCL syntax and semantics ........   25
  72.          3.2.1  Filed folds and libraries .....   25
  73.          3.2.2  Name and command line options .   25
  74.          3.2.3  Binding commands to keys ......   25
  75.          3.2.4  Other marks for folds .........   25
  76.          3.2.5  Functions and macros ..........   25
  77.          3.2.6  Control structures ............   25
  78.          3.2.7  Variables Types ...............   25
  79.          3.2.7.1  global integer variables ....   25
  80.          3.2.7.2  global integer arrays .......   25
  81.          3.2.7.3  parameter variables .........   25
  82.          3.2.8  Variable Initialization .......   25
  83.          3.2.9  Variables Usage ...............   25
  84.          3.2.9.1  Terms .......................   25
  85.          3.2.9.2  Variable statements .........   25
  86.          3.2.10  Character sets ...............   25
  87.          3.2.11  Boolean expressions ..........   25
  88.          3.2.12  The display area .............   25
  89.          3.2.13  User defined modes ...........   25
  90.          3.2.14  Multiple keyboard modes ......   25
  91.          3.2.15  Terminals ....................   25
  92.          3.2.16  Conditional compilation ......   25
  93.          3.2.17  Special commands .............   25
  94.          3.2.18  References ...................   25
  95.          3.3  OCL examples ....................   25
  96.          3.3.1  Bindings keys .................   25
  97.          3.3.2  A small function ..............   25
  98.          3.3.3  Revision control system .......   25
  99.          3.3.4  MTool-version of top-of-fold ..   25
  100.          3.3.5  Fill paragraph ................   25
  101.          3.3.6  Goto matching fence ...........   60
  102.          3.3.7  The towers of hanoi ...........   61
  103.          3.3.8  Conditional compilation .......   61
  104.          3.3.9  Libraries .....................   62
  105.          3.3.10  Modes and terminals ..........   62
  106.          3.3.11  Command line options, hooks ..   64
  107.          4  Mouse extension ...................   68
  108.          4.1  Available implementations .......   68
  109.          4.1.1  X .............................   68
  110.          4.1.2  MGR ...........................   68
  111.          4.1.3  X and MGR together ............   69
  112.          4.2  Multiple Mouse supports .........   69
  113.          4.3  Using the mouse in OCL ..........   69
  114.          5  Miscellaneous .....................   71
  115.          6  Copyright appointments ............   72
  116.          7  Acknowledgements ..................   73
  117.          8  Appendixes ........................   75
  118.          8.1  Regular expressions .............   75
  119.          8.1.1  Regular search expressions ....   75
  120.          8.1.2  Regular replace expressions ...   77
  121.          8.2  Messages ........................   79
  122.          8.3  OCL-assembler ...................   83
  123.  
  124.  
  125. Origami 1.6.92             - 2 -                October 1993
  126.  
  127.  
  128.  
  129.  
  130.  
  131. User Guide                 - 3 -
  132.  
  133.  
  134.          8.3.1  Syntax ........................   83
  135.          8.3.2  Commands ......................   84
  136.          8.4  Command line options ............   96
  137.          8.5  Compiletime Configuration .......  100
  138.          9  Index .............................  102
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189. Origami 1.6.92             - 3 -                October 1993
  190.  
  191.  
  192.  
  193.  
  194.  
  195. User Guide                 - 4 -               Using Origami
  196.  
  197.  
  198. _1.  _U_s_i_n_g _O_r_i_g_a_m_i
  199.  
  200. _1._1.  _G_e_t_t_i_n_g _S_t_a_r_t_e_d
  201.  
  202. It is assumed that Origami is installed and ready to use  on
  203. your  system.  It is invoked by typing origami at the system
  204. prompt.  Filenames may be typed after origami - if  this  is
  205. not done a prompt for a filename will be issued.
  206.  
  207. If Origami recognizes filenames, starting  with  a  symbolic
  208. home  directory  (marked with ~[_u_s_e_r_n_a_m_e]), Origami tries to
  209. use the corresponding path instead.   Therefore  the  passwd
  210. database  is  read,  if  _u_s_e_r_n_a_m_e  is  given or the value of
  211. environment variable HOME is used.
  212.  
  213. If you have not installed any resource files yourself,  Ori-
  214. gami will startup with default files, installed in your Ori-
  215. gami directory.  The resources files can be  changed.   Look
  216. in chapter Programming in OCL for more details.
  217.  
  218. Origami can handle lines up  to  1024  characters.   Reading
  219. file  with  longer  lines  will  break these lines.  In this
  220. case, a warning appears at the bottom of the screen.
  221.  
  222. Control characters will be displayed as ^  followed  by  the
  223. ASCII    coding    of    the    character   (@ABCDEFGHIJKLM-
  224. NOPQRSTUVWXYZ[\]^_ for 0..31).  The null character cannot be
  225. handled  properly for internal reasons (C strings!).  Every-
  226. thing following the null character will be ignored.  newline
  227. will  cause  a line break.  It cannot be used as input.  Use
  228. newline-and-indent instead.  The delete character  127  will
  229. be displayed ^?.
  230.  
  231. Characters with set highbit can be displayed octal  or  hex,
  232. using   command  line  option  -d_m_o_d_e.   ctrl-chars  can  be
  233. displayed in  the  same  way.   The  tab  character  can  be
  234. displayed  in  different ways (default is -t8), depending on
  235. the chosen command line option:
  236.  
  237. -t 0:
  238.      Handle as normal control character.
  239.  
  240. -t _n, _n>0:
  241.      Display tab as whitespace.
  242.  
  243. Tabs are not allowed in front of fold lines or before inden-
  244. tation level of the current fold.
  245.  
  246. Spaces and tabs at end of line will be deleted when  editing
  247. a  line!   Trailing  spaces and tabs will only remain in the
  248. text, if the concerning lines are not changed and the  lines
  249. are not inside indented folds.  otherwise Origami strips all
  250. these characters on writing the file.
  251.  
  252.  
  253.  
  254.  
  255. Origami 1.6.92             - 4 -                October 1993
  256.  
  257.  
  258.  
  259.  
  260.  
  261. User Guide                 - 5 -               Using Origami
  262.  
  263.  
  264. If you do not have write permission for the specified  file,
  265. Origami  will enter view only mode.  Look at the manual page
  266. for advanced command line options.
  267.  
  268. If the current file is a directory, Origami will use a  list
  269. of  filed  folds  for each directory entry as text.  Command
  270. line options -f and -F can be used, to control, which  files
  271. will be shown.  The corresponding regular expressions can be
  272. changed, by changing the values in histories match  and  no-
  273. match.   The  OCL  variable  diredit-long can be set to non-
  274. zero, to get directory displays in long format.
  275.  
  276. _1._2.  _T_h_e _S_c_r_e_e_n _F_o_r_m_a_t
  277.  
  278. On starting an Origami session, a status line  appears  near
  279. the  bottom  of  the screen.  This line will probably remain
  280. throughout your edit session and  any  prompts  or  warnings
  281. issued by the editor will appear below this line. If you use
  282. multiple buffers you will see several  other  status  lines,
  283. one  for each open buffer. These status lines tell you which
  284. buffer is active (selected) and divide the windows into  the
  285. buffers from each other.
  286.  
  287. If you started typing a key sequence  bound  to  a  command,
  288. this  sequence  will  be displayed under the status line, as
  289. well.   If the second character of the line is a star,  your
  290. file contains unsaved changes.  The current language and the
  291. active modes are indicated in parentheses:
  292.  
  293.      long       short   meaning
  294.      Magic      Ma      basic regular expressions active
  295.      XMagic     XM      extended regular expressions active
  296.      Folding    F       creating a fold
  297.      DefMac     D       defining a keyboard macro
  298.      View       V       Origami is in view only mode.
  299.      Over       O       Origami is in overwrite mode.
  300.      AutoSave   S       Origami is in auto save mode.
  301.      #          #       Origami is in hash shift mode
  302.      NoParse    NP      Origami is in no-parse mode.
  303.      DirView    DV      Current file is a directory.
  304.  
  305.  
  306. If the position display mode is active  (add-mode-position),
  307. the  current  line  and  column is displayed in front of the
  308. filename.   The column is the  screen  coordinate,  not  the
  309. text coordinate.   Values greater than the linelength (1024)
  310. are possible, if the current line contains characters, which
  311. are  displayed with more than one character (tabs or control
  312. characters).
  313.  
  314. If the statusline is too long, the short forms are used  and
  315. in  language  User, only the first 8 characters are shown (a
  316. cut string will be marked with a trailing $).   If required,
  317. Origami  tries to cut the path and displays `...' instead of
  318.  
  319.  
  320.  
  321. Origami 1.6.92             - 5 -                October 1993
  322.  
  323.  
  324.  
  325.  
  326.  
  327. User Guide                 - 6 -               Using Origami
  328.  
  329.  
  330. the omitted part of the path.
  331.  
  332. If there is a name defined in your keybinding  file,  it  is
  333. displayed to the left of the version number (1.6.92) instead
  334. of `Origami'.
  335.  
  336. If Origami was started with command line option '-W _s_t_r_i_n_g',
  337. _s_t_r_i_n_g will be displayed in front of the filename.
  338.  
  339. Origami can edit more than one file at a  time.   For  this,
  340. the  screen  is  split  into windows.  Each of these windows
  341. displays one of the files being edited.  Each of the windows
  342. has  a  status line.  The active buffer has a normal status-
  343. line.  The other buffer show only filename and  file-change-
  344. status.   If  more  than one buffer is used, each statusline
  345. starts with the number of the buffer.  Prompts and  warnings
  346. still appear at the bottom of the screen.
  347.  
  348. Various prompts have a history  implemented,  which  can  be
  349. used  with  the previous-line and next-line commands.  These
  350. histories can take up to 128 lines, but Origami  can  reduce
  351. the  size  of  this histories to 8, if the memory is needed.
  352. There  are  different  histories  for  commands  concerning:
  353. shell,  search,  replace,  files  and  miscellanous  things.
  354. Inside prompts only a subset of Origami  edit  functions  is
  355. allowed:
  356.  
  357. backward-character
  358. beginning-of-line
  359. forward-character
  360. end-of-line
  361. delete-previous-character
  362. undo-delete-character
  363. filename-completion
  364. newline-and-indent|end the input, current text is used
  365. any text characters
  366. previous-line
  367. next-line
  368.  
  369. test-begin-line
  370. test-end-line
  371. test-char-set
  372. test-char-less
  373. test-char-greater
  374. test-char
  375. test-str
  376. store-character
  377. case-character-toggle
  378.  
  379.  
  380. _1._3.  _T_h_e _S_p_e_c_i_a_l _E_d_i_t_o_r _B_u_f_f_e_r_s
  381.  
  382. There are three  special  buffers  in  Origami.   The  `move
  383. buffer'  contains  one text line, the `kill buffer' in which
  384.  
  385.  
  386.  
  387. Origami 1.6.92             - 6 -                October 1993
  388.  
  389.  
  390.  
  391.  
  392.  
  393. User Guide                 - 7 -               Using Origami
  394.  
  395.  
  396. several lines can be collected before  inserting  them  back
  397. into the file, and the `delete buffer', which holds the last
  398. 64 deleted lines (in each case a line can be a closed  fold,
  399. with  all  its contents).  The behaviour of these buffers in
  400. Origami is slightly different  from  TDS  (INMOS  Transputer
  401. Development System) - move, delete and kill buffers are lost
  402. on exit from Origami.  These buffers are neither  displayed,
  403. nor do they have status lines.
  404.  
  405. N.B.: the kill-buffer was named pick-buffer in TDS/Multitool
  406. and old versions of Origami.
  407.  
  408. _1._4.  _P_r_o_c_e_s_s_i_n_g _O_r_i_g_a_m_i _F_i_l_e_s
  409.  
  410. If a saved file is to pass through  a  particular  compiler,
  411. the fold structure must be hidden from the compiler by writ-
  412. ing it as  comments.   Origami  hides  the  fold-markers  by
  413. adding  up  to  64  characters  to  the start and end of the
  414. fold-marker.   As  comments  differ  from  one  language  to
  415. another,  it is necessary to choose the language before sav-
  416. ing a new file for the first time.  When reading a file back
  417. into  Origami  the  language  type is retained.  As a conse-
  418. quence you should take care not to include compiler comments
  419. within the fold header, as this will lead to nested comments
  420. which are not allowed in some languages.
  421.  
  422. The general technique for hiding a fold is:
  423.  
  424.         {{{  this is a fold
  425.         ...F  this is a filed fold for file xyz.a
  426.         }}}
  427.  
  428. appears as
  429.  
  430.         /*{{{  this is a fold*/
  431.           /*{{{F this is a filed fold for file xyz.a*/
  432.           /*:::F xyz.a*/
  433.           /*}}}  */
  434.         /*}}}  */
  435.  
  436. in the text file (language "C").
  437.  
  438. Origami marks the used comment language with a special line.
  439. This  line  will appear in front of the first fold or at end
  440. of file (unless language None is active):
  441.  
  442.         /*{{{}}}*/
  443.  
  444. if language "C" is active.
  445.  
  446. Origami knows the following languages, to hide fold-markers:
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453. Origami 1.6.92             - 7 -                October 1993
  454.  
  455.  
  456.  
  457.  
  458.  
  459. User Guide                 - 8 -               Using Origami
  460.  
  461.  
  462.  
  463.      Language   foldline comments:
  464.                 start                          end
  465.      None
  466.      Occam      --
  467.      Pascal     (*                             *)
  468.      C          /*                             */
  469.      Lisp       ;
  470.      Roff       .\"
  471.      TeX        %
  472.      Script     #
  473.      User       any sequences, up to 64 characters
  474.      Inmos      a binary format, see below
  475.  
  476.  
  477.  
  478. _1._5.  _I_n_m_o_s _F_i_l_e_s
  479.  
  480. The binary Inmos files can be edited without losing informa-
  481. tion.  There are some restrictions on editing Inmos files:
  482.  
  483. Lines are limited in length to 152.
  484.  
  485. Filed folds:
  486.      Origami cannot open filed folds, only entering is  pos-
  487.      sible.
  488.      Origami does not automatically remove  files  belonging
  489.      to  deleted  filed  folds  and does not generate unique
  490.      filenames on filing folds.
  491.  
  492. EXE, LIB, .. :
  493.      Origami is not able to create  special  fold-types  au-
  494.      tomatically,  but  can  handle  existing ones properly.
  495.      You can use a OCL-command to set  fold-type  and  fold-
  496.      contents within a function or macro to integer values.
  497.  
  498. Inmos and ASCII-files:
  499.      Since version 1.6.31,  the  ASCII-format  (using  fold-
  500.      languages  NONE,  C,  .. ) for Inmos files has changed.
  501.      The differences concern only the additional fold attri-
  502.      butes  (like  EXE,  SC, .. ).  The new format should be
  503.      able to save Inmos files with another language  without
  504.      loss  of  information,  but  we  cannot  guarantee this
  505.      feature!  Check this in your environment, before  using
  506.      it widely.
  507.      Changing the language from Inmos  to  another  one  and
  508.      writing  the  file  only changes the current file.  In-
  509.      cluded filed-folds will not be changed by this!
  510.  
  511. Inmos and trailing spaces or tabs
  512.      If language Inmos is used, all trailing spaces or  tabs
  513.      are removed while reading/writing files.
  514.  
  515.  
  516.  
  517.  
  518. Origami 1.6.92             - 8 -                October 1993
  519.  
  520.  
  521.  
  522.  
  523.  
  524. User Guide                 - 9 -       All Origami functions
  525.  
  526.  
  527. _2.  _A_l_l _O_r_i_g_a_m_i _f_u_n_c_t_i_o_n_s
  528.  
  529. This chapter lists all Origami functions with their  keybind
  530. names.   If you want to create a new keybinding, examine the
  531. files ???.keys in the bindings  directory  of  your  Origami
  532. distribution.
  533.  
  534. _2._1.  _M_o_v_i_n_g _a_r_o_u_n_d
  535.  
  536. backward-character
  537.  
  538. forward-character
  539.  
  540. previous-line
  541.  
  542. next-line
  543.  
  544. beginning-of-line
  545.  
  546. end-of-line
  547.  
  548. previous-page
  549.  
  550. next-page
  551.  
  552. beginning-of-fold
  553.      Moves to the beginning of the entered fold.
  554.  
  555. end-of-fold
  556.      Moves to the end of the entered fold.
  557.  
  558. goto-line
  559.      Prompts for a line number and moves the cursor to  this
  560.      line.   If  needed, Origami opens closed folds to reach
  561.      this line.
  562.      Warning: the line count begins at  beginning  of  file.
  563.      Versions older than 1.6.17 used the top of entered fold
  564.      as the starting point for counting!
  565.  
  566. _2._2.  _F_o_l_d_i_n_g
  567.  
  568. open-fold
  569.      Open fold and show the contents in the context  of  the
  570.      current level.
  571.      Warning: unlike TDS, you can not open file folds,  only
  572.      entering them is allowed.
  573.  
  574. close-fold
  575.      If the cursor is located within an opened  fold,  close
  576.      this fold.
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583. Origami 1.6.92             - 9 -                October 1993
  584.  
  585.  
  586.  
  587.  
  588.  
  589. User Guide                 - 10 -      All Origami functions
  590.  
  591.  
  592.  
  593. enter-fold
  594.      Enter the fold at the current line.  That  means,  show
  595.      only  the  contents  of  this  fold such that this fold
  596.      starts at indentation 0 - the First characters on  each
  597.      line  are  left at the extreme left of the logical win-
  598.      dow.    If the line is a normal fold the x position  of
  599.      the  cursor  is  preserved.   This may mean that a long
  600.      line upon which the cursor has been placed is  scrolled
  601.      out to the left.
  602.      Entering a  filed  fold  saves  the  current  file  and
  603.      switches  to  the  new one.  The cursor is moved to the
  604.      top left hand corner of the Logical  window.   The  old
  605.      file and the line are stored internally.
  606.      enter-fold adds the file to the list of  edited  files,
  607.      if the file is not in this list.
  608.      Unlike TDS, using this function on normal text lines is
  609.      allowed.   Origami  uses  the string between the cursor
  610.      position and the next single quote, double quote,  whi-
  611.      tespace or tab as filename.  If Origami cannot open the
  612.      file, it will prompt for  a  filename  (empty  filename
  613.      uses  current  file!).   The file will be entered as if
  614.      there was a filed fold for it.
  615.      Warning: since version 1.6.85, Origami  tries  to  open
  616.      '_d_i_r_n_a_m_e(_c_u_r_r_e_n_t-_f_i_l_e)/_f_i_l_e_n_a_m_e',  if  the given filed-
  617.      fold file cannot be found  using  the  current  working
  618.      directory.
  619.  
  620. exit-fold
  621.      Exit fold. Show the entered fold as closed fold and the
  622.      surrounding text again.
  623.      Exiting a filed fold saves the file, if required.
  624.      Using this function, without  having  entered  a  fold,
  625.      will  edit  a list of all command line files and edited
  626.      files shown as folds.  The cursor is moved to the line,
  627.      containing the entry for the current file.
  628.  
  629. unfold-fold
  630.      Remove fold at the current  line  -  deletes  the  fold
  631.      structure and inserts the contents of the fold instead.
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646. Origami 1.6.92             - 10 -               October 1993
  647.  
  648.  
  649.  
  650.  
  651.  
  652. User Guide                 - 11 -      All Origami functions
  653.  
  654.  
  655.  
  656. create-fold
  657.      Create fold.  Use twice - first to indicate the top  of
  658.      a  new  fold, then to indicate its bottom.  Lines to be
  659.      included within the fold must not be indented less than
  660.      the fold itself.  Tabs are not allowed at the beginning
  661.      of the folded lines if they appear before the  intended
  662.      indentation  of  the fold.  Several other keys are dis-
  663.      abled while create-fold is active.   The  part  of  the
  664.      text, which would be highlighted, is displayed inverse.
  665.      The OCL variable modify-behaviour can be used to modify
  666.      the semantics of create-fold:
  667.      modify-behaviour=0
  668.           Normal folding, as described above.
  669.      modify-behaviour=1
  670.           Do not fold, but highlight the text, as  if  fold-
  671.           ing.  Keys,  not  allowed during folding, are also
  672.           disabled here.
  673.      modify-behaviour=2
  674.           Do not fold, but highlight all text  between  cal-
  675.           ling position for create-fold and cursor position.
  676.           Keys, not allowed during folding,  are  also  dis-
  677.           abled here.
  678.      modify-behaviour=3
  679.           Do not fold, but highlight a rectangle text  block
  680.           between  calling position for create-fold and cur-
  681.           sor position.  Keys, not allowed  during  folding,
  682.           are also disabled here.
  683.      modify-behaviour=4
  684.           Do not fold, set  highlighting  mode  but  do  not
  685.           highlight  anything.   Keys,  not  allowed  during
  686.           folding, are also disabled here.
  687.      modify-behaviour=5
  688.           Like default create-fold (modify-behaviour=0), but
  689.           do not highlight anything.
  690.      modify-behaviour=-_x, 1<=_x<=4
  691.           Like modify-behaviour=_x, but the command  restric-
  692.           tions are weaker.  The additional allowed commands
  693.           are slowed down by the screen handling routines.
  694.      other values
  695.           The behaviour is undefined.
  696.      N.B.: the value  of  modify-behaviour  for  the  second
  697.      create-fold call is ignored!
  698.  
  699. auto-header
  700.      When the cursor is on a  opened/closed  fold  this  key
  701.      will  copy  the first line enclosed by that fold to the
  702.      fold line.
  703.  
  704.  
  705.  
  706.  
  707. Origami 1.6.92             - 11 -               October 1993
  708.  
  709.  
  710.  
  711.  
  712.  
  713. User Guide                 - 12 -      All Origami functions
  714.  
  715.  
  716.  
  717. toggle-file-fold
  718.      File (create a new file) or unfile a fold.  Creating  a
  719.      file  writes  the  contents of the fold into a new file
  720.      named by the fold comment (up to the  first  whitespace
  721.      or  tab).   Unlike  TDS,  Origami does not create a new
  722.      filename if the chosen one is already  used.   It  does
  723.      not  matter if you change the fold comment after filing
  724.      a fold, because the filename is stored internally.  Un-
  725.      filing  a  filed  fold  replaces the file link with the
  726.      contents of the file itself.
  727.      Unlike TDS Origami does not remove  the  original  file
  728.      included this way.
  729.  
  730. toggle-attach-file-to-fold
  731.      Attach a file to a fold.  This function links an exist-
  732.      ing  file  rather  than  creating  a  new one (and thus
  733.      differs from toggle-create-file-fold).  The filename is
  734.      taken  from the comment of the empty fold the cursor is
  735.      placed on.  The filename starts behind the foldmark and
  736.      ends  at  the first whitespace or tab.  The rest of the
  737.      line is ignored.  After attaching files you can  change
  738.      the  fold header because the file information is stored
  739.      internally.
  740.      If the cursor is on a filed fold line, the file will be
  741.      detached from the fold.
  742.      Warning: detaching a file  may  loose  the  information
  743.      about  the  filename.   Fold  comment  and filename may
  744.      differ!  Type and contents of the fold will be reset to
  745.      the default values!
  746.      Warning: since version 1.6.85, Origami tries to  attach
  747.      '_d_i_r_n_a_m_e(_c_u_r_r_e_n_t-_f_i_l_e)/_f_i_l_e_n_a_m_e',  if  the  given  file
  748.      cannot be found using the  current  working  directory.
  749.      In  this case, the filename will also be changed in the
  750.      fold comment!
  751.  
  752. _2._3.  _E_d_i_t_i_n_g
  753.  
  754. delete-line
  755.      Deletes the current line, pushing it  onto  the  delete
  756.      buffer.   The  delete  buffer  is a stack with depth 64
  757.      lines.
  758.  
  759. undo-delete-line
  760.      Pop a line from the delete buffer and paste it into the
  761.      current file above the current line.  The delete buffer
  762.      is a stack with depth 64 lines.
  763.  
  764. delete-previous-character
  765.      Deletes the character to the left of  the  cursor.   If
  766.      the  cursor  was  at the left margin, this line will be
  767.      appended to the previous line.
  768.  
  769.  
  770.  
  771. Origami 1.6.92             - 12 -               October 1993
  772.  
  773.  
  774.  
  775.  
  776.  
  777. User Guide                 - 13 -      All Origami functions
  778.  
  779.  
  780.  
  781. undo-delete-character
  782.      Undeletes the  last  deleted  character.   This  stored
  783.      character  is  only  changed  by  the  delete-previous-
  784.      character command.
  785.  
  786. case-character-toggle
  787.      Changes the case of the character under the cursor.
  788.  
  789. newline-and-indent
  790.      Opens the line at cursor position and indents the right
  791.      part like the left part.
  792.  
  793. kill-line
  794.      Removes a line from the file and adds it to the end  of
  795.      the  kill  buffer.  Note that the `kill buffer' is lost
  796.      when exiting Origami, unlike TDS.
  797.  
  798. copy-to-kill-buffer
  799.      Copies a line to the end of  the  kill  buffer  without
  800.      deleting  it  from the file.  Note that the kill buffer
  801.      is lost when exiting Origami, unlike TDS.   Lines  con-
  802.      taining  filed  folds  cannot  be  copied  to  the kill
  803.      buffer, while language Inmos is active.
  804.  
  805. insert-folded-kill-buffer
  806.      Places the kill buffer before the  current  line  as  a
  807.      fold with no comment.
  808.  
  809. move-line
  810.      If the move buffer is empty, the current line is  moved
  811.      to  the  move buffer.  Otherwise the move buffer is in-
  812.      serted before the current line.   Note  that  the  move
  813.      buffer is lost when exiting Origami, unlike TDS.
  814.  
  815. double-line
  816.      Duplicates the current line in the  file.   Lines  con-
  817.      taining   filed   folds  cannot  be  duplicated,  while
  818.      language Inmos is active.
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837. Origami 1.6.92             - 13 -               October 1993
  838.  
  839.  
  840.  
  841.  
  842.  
  843. User Guide                 - 14 -      All Origami functions
  844.  
  845.  
  846.  
  847. filter-line
  848.      Pipes the  current  line  through  a  filter.   If  the
  849.      current  line  is  a  closed fold, the contents of this
  850.      fold is filtered.  If the current line is a normal text
  851.      line,  this text will be filtered.  This command has no
  852.      effect on any other sort of line, other than to  report
  853.      its failure with a message.  The standard output of the
  854.      filter will be inserted at the position  of  the  line.
  855.      The  line  itself  will be deleted.  The text read from
  856.      the filter will be parsed for folds as expected.
  857.      If command line option -S_s_h_e_l_l is given, _s_h_e_l_l is  used
  858.      (the empty word for _s_h_e_l_l disables this command).  Oth-
  859.      erwise environment variable SHELL (default  for  SHELL,
  860.      if  empty or not defined is /bin/sh) is used to get the
  861.      shell name.
  862.      The exit code of the called command is  stored  in  the
  863.      OCL-variable  ocl-argument (-1, if no correct value can
  864.      be given).  Environment variables ORIGAMIFILE, ORIGAMI-
  865.      LINE and ORIGAMIWORD are set to current filename, text-
  866.      line and word.  Word  is  the  sequence  of  a..zA..Z_,
  867.      where the cursor stands on.  Environment variables ORI-
  868.      GAMIX and ORIGAMIY are set to  x  position  (characters
  869.      1,..)  and y position (line 1,..) in file.  Environment
  870.      variable PPID is set to Origami's process id.
  871.      Warning: the line count begins at  beginning  of  file.
  872.      Versions older than 1.6.17 used the top of entered fold
  873.      as the starting point for counting!
  874.  
  875. _2._4.  _S_e_a_r_c_h _a_n_d _r_e_p_l_a_c_e
  876.  
  877. search-forward
  878.      Prompts for a search string and moves the cursor to the
  879.      next   occurance.   The  pattern  is  searched  in  the
  880.      currently entered fold.
  881.  
  882. search-reverse
  883.      Same as search-forward, but searches backward.
  884.  
  885. replace-string
  886.      Asks for a search and a replace string and replaces all
  887.      occurances  of  the  search  string  with  the  replace
  888.      string.  The replace will be done in the currently  en-
  889.      tered fold.
  890.  
  891. query-replace-string
  892.      Same as replace-string, but asks before replacing.
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901. Origami 1.6.92             - 14 -               October 1993
  902.  
  903.  
  904.  
  905.  
  906.  
  907. User Guide                 - 15 -      All Origami functions
  908.  
  909.  
  910.  
  911. incremental-search-forward
  912.      Searches the text for a string.  String can be  entered
  913.      incrementally.   delete-previous-character jumps to the
  914.      position where the character was added  to  the  search
  915.      string.   Adding  a  character  tries  to  find the new
  916.      string.  Aborting this command jumps to the calling po-
  917.      sition.     newline-and-indent    ends    the   search.
  918.      backward-character,   incremental-search-reverse    and
  919.      search-reverse switch the search direction to backwards
  920.      and    search    the    string.      forward-character,
  921.      incremental-search-forward  and  search-forward  switch
  922.      the search direction to forward and search the  string.
  923.      previous-line  and  next-line  walk  through the search
  924.      history to get other patterns.  The pattern is searched
  925.      in the currently entered fold.
  926.      Using  backward-character,  incremental-search-reverse,
  927.      search-reverse,      next-line,      forward-character,
  928.      incremental-search-forward, search-forward  or  delete-
  929.      previous-character  as first input inside the incremen-
  930.      tal search initializes the search pattern with the last
  931.      used  pattern.   incremental-search-forward  uses goto-
  932.      line to reach the search position if it is not  already
  933.      on the screen.
  934.      N.B.: while basic or extended regular expression search
  935.      is  active  and the given string is not a valid expres-
  936.      sion, the cursor will not moved, until the string is  a
  937.      valid  regular  expression! Origami uses the same posi-
  938.      tion stack  mechanism  as  without  regular  expression
  939.      search.
  940.  
  941. incremental-search-reverse
  942.      Same as  incremental-search-forward,  but  starts  with
  943.      search direction backwards.
  944.  
  945. Warning: Searching reverse is slower then searching forward!
  946. Multiple calls of the pattern matching algorithm are necces-
  947. sary, to find a match in front of the cursor position!
  948.  
  949. _2._5.  _F_i_l_e_s
  950.  
  951. read-file
  952.      Reads another file for editing, saving the current  one
  953.      if required.  If no filename is given, the current file
  954.      is reread.
  955.      read-file adds the file to the list of edited files, if
  956.      the file is not in this list.
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964. Origami 1.6.92             - 15 -               October 1993
  965.  
  966.  
  967.  
  968.  
  969.  
  970. User Guide                 - 16 -      All Origami functions
  971.  
  972.  
  973.  
  974. open-buffer
  975.      Split the current window and prompt for the file, to be
  976.      edited in the new buffer. The new buffer will be opened
  977.      below the old buffer.
  978.      If OCL variable modify-behaviour  is  not  0,  the  new
  979.      buffer will be opened:
  980.      modify-behaviour=1
  981.           open above the current buffer
  982.      modify-behaviour=-1
  983.           open above the current buffer
  984.           do not ask for a file but open /dev/null
  985.      modify-behaviour=-2
  986.           do not ask for a file but open /dev/null
  987.      open-buffer adds the file to the list of edited  files,
  988.      if the file is not in this list.
  989.  
  990. open-adjacent-buffer
  991.      Split the current window into two adjacent windows  and
  992.      prompt  for  the  file, to be edited in the new buffer.
  993.      The new buffer will be opened to the right of  the  old
  994.      buffer.
  995.      If OCL variable modify-behaviour  is  not  0,  the  new
  996.      buffer will be opened to the left of the old buffer.
  997.      open-adjacent-buffer adds the file to the list of edit-
  998.      ed files, if the file is not in this list.
  999.  
  1000. read-list-file
  1001.      Reads another file from list of edited files for  edit-
  1002.      ing,  saving  the current one if required. If the given
  1003.      number to low  (high),  read-list-file  uses  the  last
  1004.      (first)  file  in  the  list.   read-list-file tries to
  1005.      reach the same line, you were the last time, you edited
  1006.      this file.
  1007.      If OCL variable multi-edit is set to  not  null,  read-
  1008.      list-file will not ask for the number and use the value
  1009.      -( multi-edit 1).
  1010.  
  1011. open-list-buffer
  1012.      Split the current window and prompt for the file number
  1013.      to  be  edited  in the new buffer, which will be opened
  1014.      below the current buffer.
  1015.      If OCL variable modify-behaviour  is  not  0,  the  new
  1016.      buffer will be opened above the old buffer.
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024. Origami 1.6.92             - 16 -               October 1993
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030. User Guide                 - 17 -      All Origami functions
  1031.  
  1032.  
  1033.  
  1034. open-list-adjacent-buffer
  1035.      Split the current window into two adjacent windows  and
  1036.      prompt  for  the  file  number  to be edited in the new
  1037.      buffer.
  1038.      If OCL variable modify-behaviour  is  not  0,  the  new
  1039.      buffer will be opened to the left of the old buffer.
  1040.  
  1041. enter-list-file
  1042.      Like enter-fold, but prompts for a  number  and  enters
  1043.      the given file from list of edited files.
  1044.  
  1045. save-file
  1046.      Saves the  current  file  with  the  current  name  and
  1047.      language.   This  command will only succeed if you have
  1048.      not entered a fold.
  1049.      N.B.: if Origami is in view mode, the file will not  be
  1050.      saved, even if it was changed.
  1051.  
  1052. write-file
  1053.      Prompts  for  a  filename  and  listing-mode.   If   no
  1054.      filename  is  given, the current filename will be used.
  1055.      Origami writes the text to a new file using the current
  1056.      language.   If  listing-mode is set, the generated file
  1057.      will be modified in the following way:
  1058.  
  1059.              no heading _c_o_m_m_e_n_t {{{}}} _c_o_m_m_e_n_t line
  1060.              no {{{ in fold headers
  1061.              no _c_o_m_m_e_n_t }}} _c_o_m_m_e_n_t lines
  1062.  
  1063.      If listing-mode is set, the fold structure in the writ-
  1064.      ten file is lost.  While using the language Inmos it is
  1065.      impossible to set listing-mode, because  the  the  gen-
  1066.      erated files have an incompatible structure.
  1067.  
  1068. change-buffername
  1069.      Prompts for a new name for the current file.   It  will
  1070.      not  ask  for  permission, if the current file has been
  1071.      changed.  The file-change mode  will  not  be  changed.
  1072.      The stack of entered file folds is only changed for the
  1073.      current file.
  1074.  
  1075. insert-file
  1076.      Insert File.  Prompts for a filename and  imports  this
  1077.      file  into the edited file at the current position.  If
  1078.      no filename is given, the current filename is used.
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089. Origami 1.6.92             - 17 -               October 1993
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095. User Guide                 - 18 -      All Origami functions
  1096.  
  1097.  
  1098.  
  1099. filter-buffer
  1100.      Filters the current text.  Origami prompts for the name
  1101.      of  a filter.  Origami tries to move the cursor back to
  1102.      the line on which the cursor was placed before  execut-
  1103.      ing  this  command.   Entered folds will be left before
  1104.      filtering!
  1105.      filter-buffer uses the same environment, shell and exit
  1106.      handling as filter-line.
  1107.  
  1108. pipe-from-command
  1109.      Prompts for a command.  The command is executed and its
  1110.      standard  output  inserted in the text at current posi-
  1111.      tion.
  1112.      pipe-from-command uses the same environment, shell  and
  1113.      exit handling as filter-line.
  1114.  
  1115. pipe-to-command
  1116.      Prompts for a command.  The current file will be  piped
  1117.      to this command as standard input.
  1118.      pipe-to-command uses the same  environment,  shell  and
  1119.      exit handling as filter-line.
  1120.  
  1121. _2._6.  _M_a_c_r_o_s
  1122.  
  1123. define-macro
  1124.      Records all keys in the  keyboard  macro  buffer  until
  1125.      define-macro  is  pressed  again.  Calling user defined
  1126.      functions  is   also   allowed   during   define-macro.
  1127.      define-macro  cannot  be executed while Origami prompts
  1128.      for information for another function (like  read-file).
  1129.      Origami can store up to 512 keys.
  1130.  
  1131. execute-macro
  1132.      Call keyboard macro.
  1133.  
  1134. save-keyboard-macro
  1135.      Asks for the number of a fix macro  buffer.   The  con-
  1136.      tents  of  the  keyboard macro buffer is copied to this
  1137.      fix macro buffer.  Using (deffun ..  ) in keybind makes
  1138.      it  impossible  to  overwrite  the  fix  buffer.  Using
  1139.      (defusermacros _x) in your OCL source places _x free mac-
  1140.      ro buffers at places 1.._x.
  1141.  
  1142. execute-number-macro _n, (_n=1,2,..)
  1143.      Execute fix-macro number _n.   This  command  should  be
  1144.      used  to  call  macros  defined by save-keyboard-macro.
  1145.      All other macro buffers are used by (deffun _f_o_o (...) )
  1146.      and  (keybind  _f_o_o  (...)  )  in keybind, so that using
  1147.      these operations has the same  effect  as  calling  the
  1148.      function/macro keysequence by their name!
  1149.  
  1150.  
  1151.  
  1152. Origami 1.6.92             - 18 -               October 1993
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158. User Guide                 - 19 -      All Origami functions
  1159.  
  1160.  
  1161. _2._7.  _S_h_e_l_l _c_o_m_m_a_n_d_s
  1162.  
  1163. shell
  1164.      Creates a shell according.   Exiting  from  this  shell
  1165.      will return to Origami.
  1166.      shell uses the same environment, shell  and  exit  han-
  1167.      dling as filter-line.
  1168.  
  1169. shell-command
  1170.      Prompts for a command and starts a shell which executes
  1171.      it.
  1172.      shell-command uses the same environment, shell and exit
  1173.      handling as filter-line.
  1174.  
  1175. suspend-origami
  1176.      If  your  system  has  job  control,  Origami  will  be
  1177.      suspended and the calling shell is reactivated.
  1178.      N.B.: suspend-origami is disabled, if command line  op-
  1179.      tion -Z is used or the stop signal is disabled by stty.
  1180.  
  1181. _2._8.  _A_r_g_u_m_e_n_t_s
  1182.  
  1183. Like in Emacs, you can  repeat  each  command  by  using  an
  1184. numerical  argument.   The  first  digit  is  given  by set-
  1185. argument-_d_i_g_i_t.  These functions read  more  digits  of  the
  1186. argument  until you type a non digit.  This non digit may be
  1187. a key sequence bound to a command or just a  single  charac-
  1188. ter.   It  will  be  repeated  argument times.  Pressing the
  1189. abort key will abort the repeated execution.  set-argument _x
  1190. stops the definition or execution of a keyboard macro!
  1191.  
  1192. set-argument-0 ... set-argument-9
  1193.  
  1194. If the argument is set to 0, the command  will  be  executed
  1195. once.
  1196.  
  1197. _2._9.  _S_p_e_c_i_a_l _f_u_n_c_t_i_o_n_s
  1198.  
  1199. filename-completion
  1200.      If the cursor stands on a whitespace  or  tab,  Origami
  1201.      tries  to  complete  the  word  left from the cursor as
  1202.      filename.  If the given word starts with a ~  and  does
  1203.      not  contain  any path-separator, Origami tries to com-
  1204.      plete the user name.  The OCL variable ocl-argument  is
  1205.      set to the number of added characters.  If the extended
  1206.      filename belongs to a directory, a / will also  be  ap-
  1207.      pended.
  1208.  
  1209. quote-character
  1210.      The next character typed in will be  inserted  in  your
  1211.      text, even if it is bound to a command.
  1212.  
  1213.  
  1214.  
  1215. Origami 1.6.92             - 19 -               October 1993
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221. User Guide                 - 20 -      All Origami functions
  1222.  
  1223.  
  1224.  
  1225. redraw-display
  1226.      Refresh the screen (after using screen-off).
  1227.  
  1228. center-and-redraw-display
  1229.      Refresh and center screen.   Like  redraw-display,  but
  1230.      also resets the window size.  If you are working with a
  1231.      window environment which does not send a window changed
  1232.      signal,  you may use this command after resizing a win-
  1233.      dow.
  1234.      If OCL variable modify-behaviour is set to 0, the whole
  1235.      screen  will  be drawn (useful if the screen was messed
  1236.      up by messages...), otherwise only the changes will  be
  1237.      written.
  1238.  
  1239. grow-buffer
  1240.      Increase the height of the current buffer by 1.
  1241.  
  1242. shrink-buffer
  1243.      Decrease the height of the current  buffer  by  1.   If
  1244.      open-buffer  or  If there are no (visible or invisible)
  1245.      height divisions the height of the  used  part  of  the
  1246.      screen  will  be reduced.  This is only done, while the
  1247.      current buffer uses more than 5 lines.
  1248.  
  1249. widen-buffer
  1250.      Increase the width of the current buffer by 1.
  1251.  
  1252. narrow-buffer
  1253.      if Several buffers are present decrease  the  width  of
  1254.      the  buffer  by 1.  If there are no (visible or invisi-
  1255.      ble) width divisions, the width of the used part of the
  1256.      screen  is  reduced.  This is only done, if the current
  1257.      buffer uses more than 16 columns.
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279. Origami 1.6.92             - 20 -               October 1993
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285. User Guide                 - 21 -      All Origami functions
  1286.  
  1287.  
  1288.  
  1289. describe-bindings
  1290.      Displays   the   binding    information    stored    in
  1291.      $HOME/.origamirc.   All  currently  recognized keyboard
  1292.      inputs will be printed.  There are some  special  keys,
  1293.      which can modify the display of the list:
  1294.      ` '  (space)
  1295.           Move the screen one page up.
  1296.      B or b
  1297.           Show the page before the current one.
  1298.      newline-and-indent
  1299.           Move the screen one line up.
  1300.      F or f
  1301.           prompts for a pattern and starts the list  display
  1302.           again.    Only  lines  matching  the  pattern  are
  1303.           displayed.  The empty pattern matches all lines.
  1304.      S or s
  1305.           Prompts for a pattern and  skips  forward  to  the
  1306.           next line matching the pattern.
  1307.      Q or q
  1308.           Stop the help display.
  1309.      K or k
  1310.           Like Q, but the current help view is copied to the
  1311.           kill  buffer.  If a pattern for filtering is used,
  1312.           only lines, matching this pattern will be killed.
  1313.      N.B.: lines match a pattern, if the contain the pattern
  1314.      literaly.
  1315.  
  1316. help
  1317.      Displays the helpfile $HOME/.origamihelp.  Since  there
  1318.      is  no  default  file for this function, you can create
  1319.      your own helpfile.  It may be useful for new  and  very
  1320.      complicated functions/macros or other things you always
  1321.      forget.  If there is no file  $HOME/.origamihelp,  Ori-
  1322.      gami tries to get the referencedata from rc file.
  1323.      You can use the  same  control  keys  as  in  describe-
  1324.      bindings.
  1325.      If OCL variable modify-behaviour is not set to  0,  the
  1326.      corresponding   special   help   entry,   generated  by
  1327.      @reference-begin-class will be shown.  Negative  values
  1328.      for   modify-behaviour  are  not  allowed  and  modify-
  1329.      behaviour will be set to 0 in these cases!
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340. Origami 1.6.92             - 21 -               October 1993
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. User Guide                 - 22 -      All Origami functions
  1347.  
  1348.  
  1349.  
  1350. set-language
  1351.      Allows you to select the language for which the code is
  1352.      to  be  saved  - ie the format in which folds are to be
  1353.      saved.  This can be done by entering the first  charac-
  1354.      ter  of  the  language  or  by using forward-character,
  1355.      backward-character  to  move  the  menu  cursor,  which
  1356.      starts  on the currently used language (ie is displayed
  1357.      inverse.)  If you choose User, Origami prompts for  the
  1358.      begin  comment  and end comment strings used for hiding
  1359.      the fold comments.  Each string can be up to 64 charac-
  1360.      ters in length.
  1361.      N.B.: if the current language is Inmos, Origami prompts
  1362.      for  permission, to prevent destruction of internal In-
  1363.      mos information.
  1364.  
  1365. describe-fold
  1366.      Displays information on current cursor position in file
  1367.      and  the character under the cursor as character and as
  1368.      octal,decimal and hex number.  After this,  the  number
  1369.      of  entered  folds  in  current  file,  indentation  of
  1370.      currently entered fold and  perhaps  information  about
  1371.      the closed foldline under the cursor is displayed.  The
  1372.      fold information is  a  pair  of  numbers.   The  first
  1373.      number  describes the fold type and the second the fold
  1374.      contents (range 0..255).  These codings  have  specific
  1375.      meanings  in TDS.  The OCL-variable ocl-argument is set
  1376.      to:
  1377.  
  1378.           256*type+contents                if type<128
  1379.           -(256*(type mod 128)+contents)   otherwise
  1380.  
  1381.      Warning: the line count begins at  beginning  of  file.
  1382.      Versions older than 1.6.17 used the top of entered fold
  1383.      as the starting point for counting!
  1384.  
  1385. set-file-unchanged
  1386.      Marks the file as unchanged.
  1387.  
  1388. add-mode-position
  1389.      Display current position in front of the filename.
  1390.  
  1391. delete-mode-position
  1392.      Switch off the display of the current position.
  1393.  
  1394. add-mode-full-shift
  1395.      Activates full-shift mode. Moving over the right border
  1396.      of  a  buffer  scrolls  the  whole buffer, not only the
  1397.      current line!
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405. Origami 1.6.92             - 22 -               October 1993
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411. User Guide                 - 23 -      All Origami functions
  1412.  
  1413.  
  1414.  
  1415. delete-mode-full-shift
  1416.      Switches full-shift mode off and set OCL variable  ocl-
  1417.      argument to 1, if mode full-shift was active, otherwise
  1418.      0.
  1419.  
  1420. add-mode-view
  1421.      Sets view only mode.  Changing the file is  not  possi-
  1422.      ble.
  1423.  
  1424. delete-mode-view
  1425.      Sets edit mode.
  1426.  
  1427. add-mode-overwrite
  1428.      Sets overwrite mode.  Text input will  overwrite  other
  1429.      text.
  1430.  
  1431. delete-mode-overwrite
  1432.      Sets insert mode.  Text input will be inserted.
  1433.  
  1434. add-mode-hash-shift
  1435.      Activates hash-shift-mode  (like  command  line  option
  1436.      -p).   On  reading  files,  leading hashes are moved to
  1437.      fold indentation level and on writing files, they  will
  1438.      be moved to column 1. Useful for editing C sources.
  1439.      N.B.: this mode is automatically switched  on,  if  the
  1440.      parsed  file contains  a leading # in front of the fold
  1441.      indentation level!
  1442.  
  1443. delete-mode-hash-shift
  1444.      Switches hash-shift mode off.
  1445.  
  1446. add-mode-basic-regular-expression
  1447.      The search patterns in search-forward,  search-reverse,
  1448.      incremental-search-forward, incremental-search-reverse,
  1449.      replace-string and  query-replace-string  are  read  as
  1450.      basic  regular  expressions  (like  vi).   OCL variable
  1451.      ocl-argument is set to 1.
  1452.  
  1453. add-mode-extended-regular-expression
  1454.      The search patterns in search-forward,  search-reverse,
  1455.      incremental-search-forward, incremental-search-reverse,
  1456.      replace-string and query-replace-string are read as ex-
  1457.      tended  regular expressions (like egrep).  OCL variable
  1458.      ocl-argument is set to 2.
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469. Origami 1.6.92             - 23 -               October 1993
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475. User Guide                 - 24 -      All Origami functions
  1476.  
  1477.  
  1478.  
  1479. delete-mode-regular-expression
  1480.      The search patterns in search-forward,  search-reverse,
  1481.      incremental-search-forward, incremental-search-reverse,
  1482.      replace-string  and   query-replace-string   are   used
  1483.      literaly.  OCL variable ocl-argument is set to:
  1484.  
  1485.      Value   Active regular expressions
  1486.        0     none
  1487.        1     basic
  1488.        2     extended
  1489.  
  1490.  
  1491. add-mode-echo
  1492.      Incomplete keysequences are displayed under the  status
  1493.      line.
  1494.  
  1495. delete-mode-echo
  1496.      Do not show unfinished keysequences.
  1497.  
  1498. add-mode-time
  1499.      Display the time right from the filename.
  1500.      N.B.: while Origami is waiting for  a  keyboard  input,
  1501.      the display will not be updated!
  1502.  
  1503. delete-mode-time
  1504.      Do not display the time right from the  filename.   OCL
  1505.      variable  ocl-argument  is set to 1(0), if time display
  1506.      was switched on(off).
  1507.  
  1508. add-mode-verbose
  1509.      Switch verbose-mode on. Some commands print error  mes-
  1510.      sages.
  1511.  
  1512. delete-mode-verbose
  1513.      Switch verbose-mode on.  Only important messages appear
  1514.      below the status line. This is the default.
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533. Origami 1.6.92             - 24 -               October 1993
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539. User Guide                 - 25 -      All Origami functions
  1540.  
  1541.  
  1542.  
  1543. add-mode-autosave
  1544.      Prompts for the auto save interval in minutes.  Origami
  1545.      will  save  your  files periodically in auto save mode,
  1546.      unless autosave-macro is used.  In this case the  given
  1547.      macro  will  be  executed  instead.   Default time is 8
  1548.      minutes.  Minimum  is  1  minutes  and  maximum  is  60
  1549.      minutes.
  1550.      If OCL variable  modify-behaviour is  set  to  a  value
  1551.      _x>0, add-mode-autosave will not prompt for a delay, but
  1552.      use  _x  seconds.   Very  small  values  for  _x  may  be
  1553.      dangerous!
  1554.      While Origami is waiting for a keyboard input, the save
  1555.      will be delayed!
  1556.      N.B.: You have checked in the previous version properly
  1557.      into RCS haven't you?
  1558.  
  1559. delete-mode-autosave
  1560.      auto save  is  switched  off.   The  OCL-variable  ocl-
  1561.      argument  is  set to the auto save interval in seconds,
  1562.      or 0, if auto save is already switched off.
  1563.  
  1564. add-mode-no-parse
  1565.      Origami does not parse for folds, whilst reading  files
  1566.      (similar  to  the  command  line  option -n).  The OCL-
  1567.      variable ocl-argument is set to 1, if parsing  was  ac-
  1568.      tiv, otherwise 0.
  1569.  
  1570. delete-mode-no-parse
  1571.      Origami parses folds during every command where a  file
  1572.      is read.  The OCL-variable ocl-argument is set to 1, if
  1573.      parsing was activ, otherwise 0.
  1574.  
  1575. status-line-off
  1576.      Displaying the status line is disabled.
  1577.  
  1578. status-line-on
  1579.      Displaying the status line is enabled.
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596. Origami 1.6.92             - 25 -               October 1993
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602. User Guide                 - 26 -         Programming in OCL
  1603.  
  1604.  
  1605.  
  1606. set-display-mode
  1607.      Show a menu for selecting the text display  mode.   You
  1608.      can choose:
  1609.      Quit
  1610.           Leave the menu loop.
  1611.      Octal
  1612.           Use the  octal  format  (`\_x_x_x')  for  characters,
  1613.           displayed as numbers.
  1614.      Decimal
  1615.           Use the decimal format (`\d_x_x_x')  for  characters,
  1616.           displayed as numbers.
  1617.      Hex
  1618.           Use the hexadecimal format (`\_x_x') for characters,
  1619.           displayed as numbers.
  1620.      Mark
  1621.           Display control characters with ^ followed by  one
  1622.           of    the    coding   characters   @ABCDEFGHIJKLM-
  1623.           NOPQRSTUVWXYZ[\]^_.
  1624.      Invers
  1625.           Display control characters as invers coding  char-
  1626.           acter.
  1627.      Number
  1628.           Display    control    characters    as     numbers
  1629.           (octal,decimal or hexadecimal).
  1630.      Tab(_n)
  1631.           Prompts for the width of a tab.  _n is  the  active
  1632.           size.   Negative  values and 0 will handle the tab
  1633.           as a normal control character.
  1634.      Plain
  1635.           Display normal characters by temselves.
  1636.      8-Bit
  1637.           Display characters with  set  highbit  as  numbers
  1638.           (octal,decimal or hexadecimal).
  1639.      Full
  1640.           Display all characters as  numbers  (octal,decimal
  1641.           or hexadecimal).
  1642.  
  1643.           N.B.: the numbered display for  normal  characters
  1644.           is  only  used  for  the text display window.  The
  1645.           display area and the  status  line  are  not  con-
  1646.           cerned!
  1647.  
  1648.      If OCL variable modify-behaviour is not null, the  menu
  1649.      loop will be ended after the first chosen item.
  1650.      ocl-argument is set to a coding of the current  display
  1651.      mode:
  1652.  
  1653.  
  1654. Origami 1.6.92             - 26 -               October 1993
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660. User Guide                 - 27 -         Programming in OCL
  1661.  
  1662.  
  1663.      64*_t_a_b-_w_i_d_t_h+_b_i_t-_c_o_d_e
  1664.           with
  1665.           _b_i_t-_c_o_d_e
  1666.  
  1667.                0     inverse control characters
  1668.                1     marked control characters
  1669.                2     numbered 8-bit characters
  1670.                3     all characters numbered
  1671.                4     octal display
  1672.                5     decmal display
  1673.  
  1674.      no-operation
  1675.           No operation.  This command can be used to  expli-
  1676.           citly disable keyboard inputs.
  1677.      bell
  1678.           Activates the bell of your terminal.
  1679.      visible-bell
  1680.           Activates the `visible bell' of your terminal.
  1681.      abort
  1682.           Aborts any operation.  There are several  commands
  1683.           which  can be aborted by this key.  This operation
  1684.           can only be bound to a single key.  This key  will
  1685.           even  stop  a running function/macro, which may be
  1686.           useful to interrupt an endless loop.  If  you  are
  1687.           anxious  Origami  might  be doing something wrong,
  1688.           this key returns you to  a  safe  state.   Writing
  1689.           files  can  also  be interrupted.  abort can abort
  1690.           the reading of files for the following commands:
  1691.  
  1692.                Command:               condition:
  1693.                enter-fold             a filed fold
  1694.                exit-fold              a filed fold
  1695.                file-fold              unfiling a filed fold
  1696.                insert-file
  1697.                filter-buffer
  1698.                pipe-from-command
  1699.                reading startup file   edit-file and stdin-pipe
  1700.  
  1701.           In this case, Origami  simulates  eof  for  ASCII-
  1702.           reading  and  end-of-fold  for  all open folds for
  1703.           TDS-reading.
  1704.      change-fold-mark
  1705.           Prompts for the fold marks and  replaces  them  by
  1706.           the new one.  Works like -M.
  1707.  
  1708.      _2._1_0.  _H_o_w _t_o _g_e_t _o_u_t
  1709.      save-and-exit-buffer
  1710.           Exits entered folds as needed.  Saves the file  if
  1711.           changed.   If  the buffer was the last buffer this
  1712.           command exits from Origami.
  1713.  
  1714.  
  1715. Origami 1.6.92             - 27 -               October 1993
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721. User Guide                 - 28 -         Programming in OCL
  1722.  
  1723.  
  1724.           N.B.: if Origami is in view mode,  the  file  will
  1725.           not be saved.
  1726.      exit-buffer
  1727.           If there are unsaved changes to the  file  in  the
  1728.           current  buffer, Origami prompts for permission to
  1729.           close and quit the buffer anyway.
  1730.  
  1731.      _3.  _P_r_o_g_r_a_m_m_i_n_g _i_n _O_C_L
  1732.      This chapter describes OCL (Origami  control  language)
  1733.      and  gives  some  examples  to show how powerful it is.
  1734.      OCL is a programming language offering capabilities  to
  1735.      use  conditional  statements, subroutines, loops, vari-
  1736.      ables and recursion.  It looks like  LISP,  but  it  is
  1737.      closer  to  an  assembly language.  The keybind program
  1738.      compiles human readable OCL source code into  a  token-
  1739.      ized  binary form which will be interpreted by Origami.
  1740.      Every binding of functions to keysequences must be done
  1741.      in  this  binary  file.  The functions described in the
  1742.      chapter explaining  keybindings  are  very  simple  OCL
  1743.      statements.
  1744.  
  1745.      _3._1.  _R_e_s_o_u_r_c_e _f_i_l_e_s
  1746.      Origami needs some  startup  resource  files  to  work.
  1747.      They are named .origami_e_n_d_i_n_g.
  1748.      Used endings are:
  1749.      msg
  1750.           This file contains the text strings  displayed  by
  1751.           Origami  during an editing session.  This file can
  1752.           be changed by editing it.
  1753.           Warning: The length  of  the  lines  must  not  be
  1754.           changed!
  1755.      rc
  1756.           This file contains the  binding  of  functions  to
  1757.           keys,  the  functions,  the  macros  and all other
  1758.           stuff, explained below.  Use keybind to create new
  1759.           rc-files.
  1760.      help
  1761.           This file will  be  displayed,  when  calling  the
  1762.           function help.  Any text file is allowed.
  1763.      The part origami in the filename can be changed by set-
  1764.      ting  the  command line option -k_n_a_m_e or using links to
  1765.      the binary.  The .origamimsg-file must not be  renamed,
  1766.      because  Origami looks for this file, if it cannot find
  1767.      the msg-file with the new name.
  1768.      You can set the environment  variable  ORIGAMIPATH  (or
  1769.      origamipath) to a : or ^A separated list of directories
  1770.      (Default is .:~:/home/hadig/origami).  Uppercase  vari-
  1771.      ables  with  :  as delimiter are usually used in sh and
  1772.      csh, whereas rc is able to use real lists in  variables
  1773.  
  1774.  
  1775.  
  1776. Origami 1.6.92             - 28 -               October 1993
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782. User Guide                 - 29 -         Programming in OCL
  1783.  
  1784.  
  1785.      (usually  written  in  lowercase  letters),  which  are
  1786.      stored with ^A as delimiter.   Origami  looks  for  the
  1787.      resource  files  in all these directories.  If command-
  1788.      line option -k _n_a_m_e is used, and  _n_a_m_e is  an  absolute
  1789.      path, starting from the root directory, origami ignores
  1790.      the resource path to look for the bindings file.
  1791.  
  1792.      _3._2.  _O_C_L _s_y_n_t_a_x _a_n_d _s_e_m_a_n_t_i_c_s
  1793.      This section describes all OCL elements.  It is assumed
  1794.      you are familiar with other programming languages.  You
  1795.      will find OCL examples in a later section.
  1796.      Newlines and comments can be used anywhere in the  text
  1797.      between  syntactical structures.  A comment starts with
  1798.      ; and ends at end of line.
  1799.      Though different machines have different wordlength, we
  1800.      use  a 16 bit coding for internal OCL integers.  There-
  1801.      fore the only machine  dependencies  is  the  character
  1802.      coding (ASCII, ..).
  1803.      Internal integers (addresses in  macro  code  and  con-
  1804.      stants in expressions) are limited to -32768..32767.
  1805.  
  1806.      _3._2._1.  _F_i_l_e_d _f_o_l_d_s _a_n_d _l_i_b_r_a_r_i_e_s
  1807.      Using language None, keybind will automatically include
  1808.      the  contents  of  filed  folds when reading the source
  1809.      file.  Entering filed fold is limited in  depth  to  8.
  1810.      Normally  multiple  includes  of the same file will not
  1811.      work, because redefinition of functions/macros  is  not
  1812.      allowed.   To  build  a  clean library, you can use the
  1813.      conditional compilation explained below.
  1814.      Files can be included without filed folds using:
  1815.      @include _f_i_l_e_n_a_m_e
  1816.      Another way to include library files is:
  1817.      @lib _f_i_l_e_n_a_m_e
  1818.           Keybind looks for the  file  _f_i_l_e_n_a_m_e  in  several
  1819.           directories,  given  in  the keybind library path.
  1820.           This path can  be  set  by  environment  variables
  1821.           KBDLIBPATH     or     kbdlibpath    (Default    is
  1822.           .:/home/hadig/origami/bindings/fun:/home/hadig/origami/bindings).
  1823.           Like  for  resource  files,  this path is a ':' or
  1824.           '^A' separated list  of  directories.   The  first
  1825.           directory,   containing  _f_i_l_e_n_a_m_e,  is  used.   If
  1826.           _f_i_l_e_n_a_m_e is an absolute path, keybind ignores  the
  1827.           library path.
  1828.  
  1829.      _3._2._2.  _N_a_m_e _a_n_d _c_o_m_m_a_n_d _l_i_n_e _o_p_t_i_o_n_s
  1830.      (defbinding _n_a_m_e-_o_f-_b_i_n_d_i_n_g [ ( _s_t_r_i_n_g _s_t_r_i_n_g ) ... ] )
  1831.           Defines a name for the binding which is  displayed
  1832.           in  the status line of Origami.  If none is given,
  1833.           Origami will be displayed.  Multiple usage of this
  1834.  
  1835.  
  1836.  
  1837. Origami 1.6.92             - 29 -               October 1993
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843. User Guide                 - 30 -         Programming in OCL
  1844.  
  1845.  
  1846.           command is not allowed.  The name is limited to 16
  1847.           characters.
  1848.           The optional list of string pairs can be  used  to
  1849.           define  command line option aliases.  If '( "_a_l_i_a_s
  1850.           "_v_a_l_u_e )' is defined, '-O_a_l_i_a_s' will  be  replaced
  1851.           by '-O_v_a_l_u_e' at startup.  Alias name can use up to
  1852.           16 characters.  The aliased string may not contain
  1853.           other  aliases!   _n_a_m_e-_o_f-_b_i_n_d_i_n_g  and  the  alias
  1854.           names will appear in the -h output for -O, if  the
  1855.           correct rc file is read.
  1856.           N.B.: option aliases are stored in  a  fixed  size
  1857.           field.  There is place for 128, using a 16 charac-
  1858.           ter name and a 16  character  value.   Shorter  or
  1859.           longer  values  are allowed, but the total maximum
  1860.           size cannot be changed!
  1861.  
  1862.      _3._2._3.  _B_i_n_d_i_n_g _c_o_m_m_a_n_d_s _t_o _k_e_y_s
  1863.      (keybind _o_p_e_r_a_t_i_o_n _k_e_y_s_e_q_u_e_n_c_e)
  1864.           The Origami operation named _o_p_e_r_a_t_i_o_n is bound  to
  1865.           the  keyboard input _k_e_y_s_e_q_u_e_n_c_e.  The binding help
  1866.           will contain the entry:
  1867.  
  1868.                   operation keysequence
  1869.  
  1870.      (keybind "_s_i_n_g_l_e-_c_h_a_r _k_e_y_s_e_q_u_e_n_c_e)
  1871.           The normal character _s_i_n_g_l_e-_c_h_a_r is bound  to  the
  1872.           keyboard input _k_e_y_s_e_q_u_e_n_c_e.  The binding help will
  1873.           contain the entry:
  1874.  
  1875.                   single-char keysequence.
  1876.  
  1877.           For example, this form of keybind can be  used  to
  1878.           map  some  keys  of  a keypad to normal characters
  1879.           like + or * while using others as cursor keys.
  1880.      (keybind - _k_e_y_s_e_q_u_e_n_c_e)
  1881.           _k_e_y_s_e_q_u_e_n_c_e triggers  the  key-not-bound-handling.
  1882.           Complain  about  the unknown sequence, and if key-
  1883.           not-bound-macro was used, start the  corresponding
  1884.           action.   This  bindings will not be stored in the
  1885.           bindings list.
  1886.      (alias _n_a_m_e _k_e_y_s_e_q_u_e_n_c_e)
  1887.           The keyboard input _k_e_y_s_e_q_u_e_n_c_e can be addressed as
  1888.           $_n_a_m_e  in  the following definitions.  Using $_n_a_m_e
  1889.           places the symbolic reference name in the  binding
  1890.           help rather than the key sequence itself.
  1891.           Multiple alias definitions for a single  key  _n_a_m_e
  1892.           are  allowed.   In  this  case, every use of $_n_a_m_e
  1893.           will generate as many sequences, as alias are  de-
  1894.           fined.
  1895.           The following alias can be used  without  declara-
  1896.  
  1897.  
  1898. Origami 1.6.92             - 30 -               October 1993
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904. User Guide                 - 31 -         Programming in OCL
  1905.  
  1906.  
  1907.           tion:
  1908.  
  1909.                   $esc = escape key = 27
  1910.  
  1911.           Use autoalias to create your alias declarations.
  1912.      _n_a_m_e
  1913.           _n_a_m_e is a normal identifier not beginning with  @.
  1914.           The length is limited to 128.
  1915.      _k_e_y_s_e_q_u_e_n_c_e
  1916.           _k_e_y_s_e_q_u_e_n_c_e is  a  sequence  of  _k_e_y  enclosed  in
  1917.           parentheses.   _k_e_y_s_e_q_u_e_n_c_es  are limited in length
  1918.           to 64.  _k_e_y specifies a single key (or  two  keys,
  1919.           because  M-"a requires two keystrokes).  Valid de-
  1920.           clarations for _k_e_y are:
  1921.           "_x
  1922.                the single character _x.  ' '  will  be  named
  1923.                space in the bindinglist.
  1924.           C-_X
  1925.                codes   the   non    printable    characters.
  1926.                @A..Z[\]^_  codes  the  characters  0..31.  ?
  1927.                codes 127=delete-key.
  1928.           M-"_x
  1929.                Meta-key (ESC) followed by _x (case sensitive)
  1930.           M-C-_X
  1931.                META-control-_x,  that  means  Meta-key  (ESC)
  1932.                followed  by non-printable character control-
  1933.                _x.
  1934.           $_n_a_m_e
  1935.                the key sequence defined by ( alias _n_a_m_e  ...
  1936.                ).  The bindinglist contains _n_a_m_e.
  1937.           0x_h_e_x_d_i_g_i_t_s
  1938.                represents the given number
  1939.           *
  1940.                Matches all characters, not explicitly  bound
  1941.                in another statement.
  1942.                The command `unbind-remaining-keys' has  been
  1943.                deleted,  but you can use `*' in the sequence
  1944.                and `-' as function can be  used  to  replace
  1945.                it:
  1946.  
  1947.                        ; old syntax
  1948.                        ( unbind-remaining-keys ( mode-name ) )
  1949.  
  1950.                        ; new syntax
  1951.                        ( mode mode-name ( keybind - ( * ) ) )
  1952.  
  1953.                The wildcards (`*') in the  keysequences  are
  1954.                evaluated,  after all bindings are done.  The
  1955.                following example shows the evaluation of *:
  1956.  
  1957.  
  1958.  
  1959. Origami 1.6.92             - 31 -               October 1993
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965. User Guide                 - 32 -         Programming in OCL
  1966.  
  1967.  
  1968.                        ( alias _f_1 ( $_e_s_c "[ "_2 "_4 "_0 ) )
  1969.                        ( alias _f_2 ( $_e_s_c "[ "_2 "_4 "_1 ) )
  1970.                        ( alias _f_u_n_c_t_i_o_n-_k_e_y-_f_o_r_m_a_t ( $_e_s_c "[ *1 *2 *3 "_z ) )
  1971.                         ; alias does not bind any key, so:
  1972.                         ;  *1-3 are not evaluated, only stored
  1973.  
  1974.                        ( keybind _f_u_n-_1 ( $_f_1 ) )
  1975.                        ( keybind _f_u_n-_2-_1 ( $_f_2 "_1 ) )
  1976.                        ( keybind _f_u_n-_2-_2 ( $_f_2 "_2 ) )
  1977.  
  1978.                        ( keybind - ( *4 ) )
  1979.                         ; only sequences starting with $_e_s_c are used, so:
  1980.                         ;  *4 matches any character, but the escape character
  1981.  
  1982.                        ( keybind - ( $_f_u_n_c_t_i_o_n-_k_e_y-_f_o_r_m_a_t *5 ) )
  1983.                         ; $_f_1 and $_f_2 are used for bindings, so:
  1984.                         ;  *1 matches all but `2' here
  1985.                         ;  *2 matches all but `4' here
  1986.                         ;  *3 matches all but `0' and `1' here
  1987.                         ;  *5 matches all but `1' and `2' here
  1988.  
  1989.                        ( keybind - ( $_e_s_c $_f_u_n_c_t_i_o_n-_k_e_y-_f_o_r_m_a_t ) )
  1990.                         ; there are no bindings for $_e_s_c $_e_s_c, so:
  1991.                         ;  *1-3 match any character here
  1992.  
  1993.      (overload-prefix ( _p_r_e_f_i_x ... ))
  1994.           Binding  functions  named  _p_r_e_f_i_x????  to   keyse-
  1995.           quences,  uses ??? as name instead of _p_r_e_f_i_x??? in
  1996.           the binding help.
  1997.  
  1998.      _3._2._4.  _O_t_h_e_r _m_a_r_k_s _f_o_r _f_o_l_d_s
  1999.      (defmark _n_a_m_e ( _m_a_r_k_1 _m_a_r_k_2 _m_a_r_k_3 _m_a_r_k_4 ))
  2000.           This option places the definition  of  alternative
  2001.           fold  marks  in  the  rcfile,  so that Origami can
  2002.           switch to these marks when  invoked  with  command
  2003.           line  option  -m_n_a_m_e.   _n_a_m_e  will  be cut, if the
  2004.           length is >_ 9.  The format for _m_a_r_k? is:
  2005.  
  2006.                   ( _s_i_n_g_l_e-_c_h_a_r _s_i_n_g_l_e-_c_h_a_r _s_i_n_g_l_e-_c_h_a_r )
  2007.  
  2008.           where _s_i_n_g_l_e-_c_h_a_r is a "_x definition like in (key-
  2009.           bind  ...   ).   The  meanings of _m_a_r_k_1 ...  _m_a_r_k_4
  2010.           are:
  2011.  
  2012.                item:   used for:            default:
  2013.                _m_a_r_k_1   begin of fold          {{{
  2014.                _m_a_r_k_2   closed fold            ...
  2015.                _m_a_r_k_3   name of filed fold     :::
  2016.                        attributes of fold
  2017.                _m_a_r_k_4   end of fold            }}}
  2018.  
  2019.  
  2020.      _3._2._5.  _F_u_n_c_t_i_o_n_s _a_n_d _m_a_c_r_o_s
  2021.  
  2022.  
  2023.  
  2024. Origami 1.6.92             - 32 -               October 1993
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030. User Guide                 - 33 -         Programming in OCL
  2031.  
  2032.  
  2033.      (defmac _n_a_m_e (_s_t_a_t_e_m_e_n_t ... ))
  2034.           A macro _n_a_m_e will be defined.   Recursive  invoca-
  2035.           tions will be detected and handled inside the mac-
  2036.           ro code.  The macrocall will be replaced by inline
  2037.           code.   If  the  OCL-assembler code for this macro
  2038.           has a length 1, this macro can also  be  bound  to
  2039.           keys.  Longer macros can only be used inside other
  2040.           macro definitions.
  2041.      (deffun [ ( _v_a_r_i_a_b_l_e-_n_a_m_e ... ) ] _n_a_m_e  (_s_t_a_t_e_m_e_n_t  ...
  2042.      ))
  2043.           The operations in (_s_t_a_t_e_m_e_n_t ...  ) are written to
  2044.           the .origamirc file so that Origami can initialize
  2045.           a fix-macro-buffer with the function _n_a_m_e.  Recur-
  2046.           sion  is  allowed.  In the OCL text following this
  2047.           definition, you can use _n_a_m_e as function  call  or
  2048.           for  key  bindings.  You cannot redefine the func-
  2049.           tion (unless you use undeclare).
  2050.           The optional list of variable-names can be used to
  2051.           specify  integer arguments, which will be set from
  2052.           the caller.   Recursion  is  also  supported  (the
  2053.           values  are  saved on a stack).  Inside _s_t_a_t_e_m_e_n_t,
  2054.           the  names  given  in  "(  _v_a_r_i_a_b_l_e-_n_a_m_e  ...   )"
  2055.           overwrite  variables,  defined  using "(defvar ...
  2056.           )".  After the definition of _s_t_a_t_e_m_e_n_t, the  vari-
  2057.           ables cannot be accessed anymore.
  2058.      (defassembler _n_a_m_e (_a_s_s_e_m_b_l_e_r-_s_t_a_t_e_m_e_n_t ... ))
  2059.           Like deffun, but the code is given as  a  list  of
  2060.           assembler  statements.  An argument list cannot be
  2061.           given here.  If you need the assembler function to
  2062.           be  called with arguments, use '(forward _a_r_g_u_m_e_n_t-
  2063.           _l_i_s_t _n_a_m_e )' in front of the  defassembler  state-
  2064.           ment.   OCL  assembler  syntax is explained in the
  2065.           appendix.
  2066.      (initfun _n_a_m_e (_s_t_a_t_e_m_e_n_t ... ))
  2067.           Like defmac.  In addition to  this,  the  code  is
  2068.           written  to  the rc-file to enable the use of _n_a_m_e
  2069.           in (keybind ...  ) statements.
  2070.           Warning: using save-keyboard-macro x has no effect
  2071.           on  functions  defined  with initfun, when calling
  2072.           them by their name inside  a  function/macro.   If
  2073.           you  want  to  use  such  an  effect  you must use
  2074.           execute-number-macro    x    in    the     calling
  2075.           function/macro.
  2076.      (undeclare ( _n_a_m_e ... ))
  2077.           Remove functions, macros and variables  (explained
  2078.           below)  from  the symbol table.  The objects still
  2079.           exist, but the textually following OCL-source can-
  2080.           not  access  them.   It can be used, to hide local
  2081.           variables/macros.  The names can be used again for
  2082.           other   purposes  without  affecting  the  earlier
  2083.           usage.  Forwarded functions have to  be  declared,
  2084.  
  2085.  
  2086.  
  2087. Origami 1.6.92             - 33 -               October 1993
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093. User Guide                 - 34 -         Programming in OCL
  2094.  
  2095.  
  2096.           before undeclaring them.
  2097.           You can also undeclare the standard Origami  func-
  2098.           tions  (like enter-fold).  This can be used to re-
  2099.           place the default functions by your own:
  2100.  
  2101.                   ( defmac enter-fold-orig ( enter-fold ) )
  2102.                   ( undeclare ( enter-fold ) )
  2103.                   ( deffun enter-fold
  2104.                      ...  your code, using enter-fold-orig
  2105.                   )
  2106.                   ( undeclare ( enter-fold-orig ) )
  2107.  
  2108.           Warning: using undeclare is the only way for rede-
  2109.           fining  things in OCL, but this redefiniton has no
  2110.           effect on definitions, made before!
  2111.      (defusermacros _n_u_m_b_e_r)
  2112.           This   command   must   be   used    before    any
  2113.           deffun/initfun  statement.   The fix-macro-buffers
  2114.           1.._n_u_m_b_e_r are not used by OCL to store  functions.
  2115.           They can be used for save-keyboard-macro.
  2116.      N.B.: Using the commands deffun and  initfun  uses  the
  2117.      fix-macro-buffers 1,2,.. (or _x,_x+1,.., if you have used
  2118.      (defusermacros _x)).
  2119.      ( demand-load ( _o_c_l-_s_o_u_r_c_e ) )
  2120.           All functions, defined in _o_c_l-_s_o_u_r_c_e using  deffun
  2121.           or  defassembler  are  marked  as  demand-loading.
  2122.           Origami doesn't read them at startup but at  first
  2123.           usage.  demand-load statements can be nested.  The
  2124.           abort-macro or functions called by abort-macro may
  2125.           not be marked as demand-loading.
  2126.      ( demand-load not( _o_c_l-_s_o_u_r_c_e ) )
  2127.           All functions, defined in _o_c_l-_s_o_u_r_c_e using  deffun
  2128.           or  defassembler are not marked as demand-loading.
  2129.           Origami reads them at startup.  Inside _o_c_l-_s_o_u_r_c_e,
  2130.           no other demand-load or demand-load not statements
  2131.           is allowed.
  2132.      (start-list-editing)
  2133.           Origami starts editing the list of  edited  files,
  2134.           even  if  command  line option -A is not active or
  2135.           number of files is 1.
  2136.      (status-line-off)
  2137.           Origami starts without displaying the status line.
  2138.           The  Origami  commands  status-line-on and status-
  2139.           line-off can be used during the editing  to  over-
  2140.           ride this default.
  2141.      (forward [ ( _v_a_r_i_a_b_l_e-_n_a_m_e ... ) ] _n_a_m_e )
  2142.           _n_a_m_e is declared as a name for a function  defined
  2143.           with  initfun  or deffun.  In the following state-
  2144.           ments, _n_a_m_e can be used as function call even  be-
  2145.           fore  its  actual definition with (deffun _n_a_m_e ...
  2146.  
  2147.  
  2148. Origami 1.6.92             - 34 -               October 1993
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154. User Guide                 - 35 -         Programming in OCL
  2155.  
  2156.  
  2157.           ).
  2158.      (change-buffer-macro _n_a_m_e)
  2159.           The function named _n_a_m_e is called every time,  you
  2160.           switch to another buffer.
  2161.      (read-newfile-macro _n_a_m_e)
  2162.           The function named _n_a_m_e is called every time a new
  2163.           file  is  edited, either explicitly or by entering
  2164.           or exiting a filed fold.
  2165.      (abort-macro _n_a_m_e)
  2166.           The function named _n_a_m_e is executed each time  the
  2167.           abort key is pressed.
  2168.      (view-macro _n_a_m_e)
  2169.           The function named _n_a_m_e is executed  at  each  at-
  2170.           tempt  to  change  the  file  in  view mode.  ocl-
  2171.           argument is set to the ignored OCL command.
  2172.      (begin-prompt-macro _n_a_m_e)
  2173.           The function named  _n_a_m_e  is  executed  each  time
  2174.           prompt  mode  is  entered (except the OCL commands
  2175.           prompt and prompt-counter).  The  repeat  argument
  2176.           function  reads its arguments in prompt mode.  The
  2177.           function and all called functions/macros may  only
  2178.           use  the  following OCL-elements (some of them are
  2179.           explained in the following chapters):
  2180.  
  2181.                controls:
  2182.                 if-fi                if-else-fi
  2183.                 case-default-esac    local
  2184.                 while                do-while
  2185.  
  2186.                commands:
  2187.                 exit                 message-exit
  2188.                 set                  modes from (defmodes ... )
  2189.                 history              get-history
  2190.                 set-file-unchanged
  2191.  
  2192.                booleans:
  2193.                 not
  2194.                 and                                               or
  2195.                 < <> >               <= = >=
  2196.                 test-echo            test-file-changed
  2197.                 last-message         test-view
  2198.                 test-autosave        in-prompt
  2199.                 test-folding         test-language
  2200.                 test-overwrite       test-begin-fold
  2201.                 test-fold-line       test-end-fold
  2202.                 test-filed           test-text
  2203.                 test-hash-shift
  2204.  
  2205.                terms:
  2206.                 set-enter            set-space-enter              file-type
  2207.                 numbers              characters
  2208.                 +                    -                            *
  2209.  
  2210.  
  2211. Origami 1.6.92             - 35 -               October 1993
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217. User Guide                 - 36 -         Programming in OCL
  2218.  
  2219.  
  2220.                 modulo               div
  2221.  
  2222.           Warning: keybind does not check if  you  only  use
  2223.           the  allowed commands!  Only the valid commands in
  2224.           called functions/macros  will  be  executed.   All
  2225.           other commands will be ignored, but do not rely on
  2226.           this feature!
  2227.      (end-prompt-macro _n_a_m_e)
  2228.           The function named  _n_a_m_e  is  executed  each  time
  2229.           prompt  mode  is finished (except the OCL commands
  2230.           prompt and prompt-counter).  The command  restric-
  2231.           tions  for  the function are the same as in begin-
  2232.           prompt-macro.
  2233.      (key-not-bound-macro _n_a_m_e)
  2234.           The function named _n_a_m_e is executed each  time  an
  2235.           illegal keysequence was entered.  The command res-
  2236.           trictions for the function  are  the  same  as  in
  2237.           begin-prompt-macro.
  2238.      (autosave-macro _n_a_m_e)
  2239.           If autosave-macro is given, the execution of  this
  2240.           macro replaces the saving of all changed files.
  2241.      (sigquit-macro _n_a_m_e)
  2242.           If set, Origami tries to execute _n_a_m_e, if  Origami
  2243.           got the signal SIGQUIT.
  2244.      (sigusr1-macro _n_a_m_e)
  2245.           If set, Origami tries to execute _n_a_m_e, if  Origami
  2246.           got the signal SIGUSR1.
  2247.      (sigusr2-macro _n_a_m_e)
  2248.           If set, Origami tries to execute _n_a_m_e, if  Origami
  2249.           got the signal SIGUSR2.
  2250.  
  2251.      _3._2._6.  _C_o_n_t_r_o_l _s_t_r_u_c_t_u_r_e_s
  2252.      A _s_t_a_t_e_m_e_n_t can be one of the following control  struc-
  2253.      tures or functions:
  2254.      while _c_o_n_d_i_t_i_o_n (_s_t_a_t_e_m_e_n_t ... )
  2255.           Prechecked loop, _s_t_a_t_e_m_e_n_t ...  is repeated  while
  2256.           the condition is true.
  2257.      do (_s_t_a_t_e_m_e_n_t ... ) while _c_o_n_d_i_t_i_o_n
  2258.           Postchecked loop, _s_t_a_t_e_m_e_n_t ...  is repeated until
  2259.           the condition is false.
  2260.      if _c_o_n_d_i_t_i_o_n (_s_t_a_t_e_m_e_n_t ... ) [ else (_s_t_a_t_e_m_e_n_t ... ) ]
  2261.      fi
  2262.           Conditional statement.  If condition is true,  the
  2263.           first statement list is executed.  If condition is
  2264.           false, the second statement list, if given, is ex-
  2265.           ecuted.
  2266.      case (_c_o_n_d_i_t_i_o_n (_s_t_a_t_e_m_e_n_t ... )) ... [ default (_s_t_a_t_e-
  2267.      _m_e_n_t ... ) ] esac
  2268.  
  2269.  
  2270.  
  2271. Origami 1.6.92             - 36 -               October 1993
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277. User Guide                 - 37 -         Programming in OCL
  2278.  
  2279.  
  2280.           Conditional statement.  The  block  of  statements
  2281.           following   the   first   conditional   expression
  2282.           evaluating to TRUE is executed.  If  none  of  the
  2283.           conditions  is  true, the given default statements
  2284.           are executed.
  2285.      repeat _t_e_r_m (_s_t_a_t_e_m_e_n_t ... )
  2286.           (_s_t_a_t_e_m_e_n_t ... ) is repeated _t_e_r_m times.
  2287.           Warning: old versions of keybind stored the called
  2288.           statements _t_e_r_m times.  _t_e_r_m had to be a constant!
  2289.           This new version of keybind generates code,  which
  2290.           uses  an internal OCL-variable to count the loops.
  2291.           The number of repeats need not be a constant!  The
  2292.           repeated  statement  list is not called via a sub-
  2293.           routine call, so return-from-macro will leave  the
  2294.           current function/macro, not only the repeat!
  2295.      prompt _m_e_s_s_a_g_e-_s_t_r_i_n_g
  2296.           Displays _m_e_s_s_a_g_e-_s_t_r_i_n_g below the status line  and
  2297.           waits  for  newline-and-indent.   If Origami is in
  2298.           define-macro-mode, the newline-and-indent will not
  2299.           be stored!  _m_e_s_s_a_g_e-_s_t_r_i_n_g can be:
  2300.           _s_t_r_i_n_g
  2301.           (_m_e_s_s_a_g_e-_s_t_r_i_n_g-_i_t_e_m ... )
  2302.                This list of _m_e_s_s_a_g_e-_s_t_r_i_n_g-_i_t_e_ms can contain
  2303.                more complicated entries.  They are:
  2304.                _s_t_r_i_n_g
  2305.                counter _n_a_m_e
  2306.                     This will  be  replaced  by  the  ASCII-
  2307.                     representation  of  the  value  of  OCL-
  2308.                     variable _n_a_m_e.
  2309.                _n_u_m_b_e_r
  2310.                     This will  be  replaced  by  the  ASCII-
  2311.                     representation of _n_u_m_b_e_r.
  2312.                history _h_i_s_t_o_r_y-_n_a_m_e
  2313.                     use the text  of  "get-history  _h_i_s_t_o_r_y-
  2314.                     _n_a_m_e   0".    get-history  is  explained
  2315.                     below.
  2316.                _o_r_i_g_a_m_i-_m_e_s_s_a_g_e
  2317.                     where _o_r_i_g_a_m_i-_m_e_s_s_a_g_e can be one of  the
  2318.                     message  names  declared  in the Origami
  2319.                     sources, file msg.  Empty  strings  will
  2320.                     be  substituted  for %s formatting argu-
  2321.                     ments.  Random values will  be  used  to
  2322.                     replace all other formatting arguments.
  2323.           Warning: Origami cuts long  _m_e_s_s_a_g_e-_s_t_r_i_n_gs  after
  2324.           1024 characters.
  2325.           Origami displays _m_e_s_s_a_g_e-_s_t_r_i_n_g  and  waits  until
  2326.           you  type  a  newline-and-indent on your keyboard.
  2327.           The given input will not  be  interpreted.   Thus,
  2328.  
  2329.  
  2330.  
  2331. Origami 1.6.92             - 37 -               October 1993
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337. User Guide                 - 38 -         Programming in OCL
  2338.  
  2339.  
  2340.           typing  the  keysequence of a function not execute
  2341.           it.
  2342.           Warning: if prompt is called  during  define-macro
  2343.           is  active,  the given input will not be stored in
  2344.           the macro!  This command  does  not  activate  the
  2345.           begin-  /  end-prompt-macro, because you can do it
  2346.           explicitly in the OCL-code.
  2347.      message _m_e_s_s_a_g_e-_s_t_r_i_n_g
  2348.           Like prompt, but does not wait for input.
  2349.           If OCL variable modify-behaviour  is  not  0,  the
  2350.           message  will only be printed, if command line op-
  2351.           tion -V is active.
  2352.      exit
  2353.           All running functions are aborted.
  2354.      message-exit _m_e_s_s_a_g_e-_s_t_r_i_n_g
  2355.           Same as exit.  _m_e_s_s_a_g_e-_s_t_r_i_n_g is  displayed  under
  2356.           the status line.
  2357.      return-from-macro
  2358.           The currently executed function/macro ends and the
  2359.           caller  (keyboard, function or macro) resumes exe-
  2360.           cution.
  2361.      local (_n_a_m_e ... ) (_s_t_a_t_e_m_e_n_t ... )
  2362.           The values of the variables _n_a_m_e  ...   are  saved
  2363.           during  the execution of (_s_t_a_t_e_m_e_n_t ...  ) and re-
  2364.           stored to their original values afterwards.
  2365.           N.B.: (_s_t_a_t_e_m_e_n_t ...  ) is executed as  a  subrou-
  2366.           tine,  so that using return-from-macro inside will
  2367.           only  leave  this  block  and  not   the   current
  2368.           function/macro.   It  is  allowed  to  use a empty
  2369.           variable-list inside the local-statement.  In this
  2370.           case,  the  statement  can be used, to use return-
  2371.           from-macro as a kind of break!
  2372.      show-cursor _t_e_r_m
  2373.           The text cursor is displayed  and  Origami  sleeps
  2374.           for  _t_e_r_m/10  seconds.   _t_e_r_m  is explained in the
  2375.           following chapter Variables.
  2376.      _o_r_i_g_a_m_i-_c_o_m_m_a_n_d
  2377.           All Origami commands you can use from the keyboard
  2378.           can  also be used by their names.  abort stops the
  2379.           function/macro  execution  and  calls  the  abort-
  2380.           macro, if it is defined.
  2381.      _m_a_c_r_o-_n_a_m_e or _f_u_n_c_t_i_o_n-_n_a_m_e
  2382.           All macros defined with defmac and  all  functions
  2383.           defined  with  initfun  can be used by their name.
  2384.           Functions defined with deffun or  forward  can  be
  2385.           used, if they do not need any arguments.
  2386.      _f_u_n_c_t_i_o_n-_n_a_m_e ( _t_e_r_m ...)
  2387.           All functions defined with deffun or  forward  can
  2388.  
  2389.  
  2390.  
  2391. Origami 1.6.92             - 38 -               October 1993
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397. User Guide                 - 39 -         Programming in OCL
  2398.  
  2399.  
  2400.           be  used,  if they need some arguments. The number
  2401.           of terms must fit the definition of _f_u_n_c_t_i_o_n-_n_a_m_e.
  2402.           _t_e_r_ms are explained below in chapter Variables.
  2403.      _h_o_o_k_s
  2404.           If the corresponding hooks  are  already  defined,
  2405.           you  can  use  these names to call them (otherwise
  2406.           the statement has no effect):
  2407.           change-buffer-macro
  2408.           read-newfile-macro
  2409.           abort-macro
  2410.           view-macro
  2411.           begin-prompt-macro
  2412.           end-prompt-macro
  2413.           key-not-bound-macro
  2414.           autosave-macro
  2415.           sigquit-macro
  2416.           sigusr1-macro
  2417.           sigusr2-macro
  2418.      insert-ascii _o_r_i_g_a_m_i-_m_e_s_s_a_g_e
  2419.           Put the string for _o_r_i_g_a_m_i-_m_e_s_s_a_g_e  in  the  text,
  2420.           where  _o_r_i_g_a_m_i-_m_e_s_s_a_g_e  can  be one of the message
  2421.           names declared in the Origami sources, file msg.
  2422.      _s_t_r_i_n_g_s
  2423.           Normal text can be used.  The syntax is:
  2424.           "_t_e_x_t
  2425.                _t_e_x_t can  be  a  any  string  not  containing
  2426.                <space>, " or ).
  2427.           "<space> to use <space>
  2428.           ") to use )
  2429.           "" to use "
  2430.           Warning: if you use Origami to edit an  OCL  file,
  2431.           "<space>  should  not  be  the last statement of a
  2432.           line because Origami deletes all spaces at end  of
  2433.           line.   The problem can be circumvented by append-
  2434.           ing a comment to the line.
  2435.  
  2436.      _3._2._7.  _V_a_r_i_a_b_l_e_s _T_y_p_e_s
  2437.      OCL knows 3 types of variables:
  2438.  
  2439.      _3._2._7._1.  _g_l_o_b_a_l _i_n_t_e_g_e_r _v_a_r_i_a_b_l_e_s
  2440.      These variables have to be declared with:
  2441.      (defvar (_v_a_r_i_a_b_l_e_n_a_m_e .. ))
  2442.      The  following  global  integer  variables  are  always
  2443.  
  2444.  
  2445. Origami 1.6.92             - 39 -               October 1993
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451. User Guide                 - 40 -         Programming in OCL
  2452.  
  2453.  
  2454.      predefined,  their  values are set by Origami automati-
  2455.      cally:
  2456.      screen-height,  screen-width,   cursor-level,   screen-
  2457.      width-offset, screen-height-offset
  2458.           The three  OCL  variables  screen-height,  screen-
  2459.           width and cursor-level are set to size of the text
  2460.           editing area of the current buffer on  the  screen
  2461.           and  the number of the line, the cursor is in (top
  2462.           of buffer  buffer  window  =  1).   The  variables
  2463.           screen-width-offset  and screen-height-offset con-
  2464.           tain the offsets of the current buffer  window  on
  2465.           the screen.
  2466.      current-buffer-number, current-buffer-id, used-buffers,
  2467.      multi-edit
  2468.           The variable used-buffers shows the number of used
  2469.           buffers.
  2470.           current-buffer-number shows the number of the  ac-
  2471.           tive (current) buffer.  This number is not a fixed
  2472.           name, but represents the position of  this  buffer
  2473.           in  the  internal  list of used buffers.  It might
  2474.           change, if new  buffers  are  opened  or  existing
  2475.           buffers are deleted!
  2476.           The  OCL-variable  current-buffer-id  contains   a
  2477.           number,  representing  the  creation  time  of the
  2478.           buffer. During the editing session, this will  not
  2479.           change for a buffer.
  2480.           multi-edit contains the number of  buffers,  which
  2481.           are used to edit the file in the current buffer.
  2482.      ocl-argument
  2483.           The OCL variable ocl-argument can be set by  using
  2484.           the command line option -O_v_a_l_u_e.  This variable is
  2485.           also used, to store the  exit  status  for  shell-
  2486.           command, shell, filter-buffer, pipe-to-command and
  2487.           pipe-from-command.  filename-completion stores the
  2488.           number  of  added  characters in it.  delete-mode-
  2489.           time stores the old  time  mode  in  it.   delete-
  2490.           mode-autosave  returns  information  about the old
  2491.           auto save interval in this variable.  ocl-argument
  2492.           is  set  to the OCL command token, which cannot be
  2493.           executed while view mode is active.
  2494.      modify-behaviour
  2495.           modify-behaviour   changes   the   semantics    of
  2496.           Origami/OCL-functions:
  2497.  
  2498.           command                     modification/effect
  2499.           create-fold                 switch on highlighting mode
  2500.           open-buffer                 place/file
  2501.           open-list-buffer            place/file
  2502.           open-adjacent-buffer        place/file
  2503.           open-list-adjacent-buffer   place/file
  2504.           help                        show @reference-begin-class help
  2505.           message                     print only in verbose mode
  2506.  
  2507.  
  2508.  
  2509. Origami 1.6.92             - 40 -               October 1993
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515. User Guide                 - 41 -         Programming in OCL
  2516.  
  2517.  
  2518.           center-and-redraw-display   screen invalid
  2519.           add-mode-autosave           delay in seconds
  2520.           set-display-mode            do not stay in menu
  2521.  
  2522.      key-count
  2523.           key-count contains the number of keyboard  inputs,
  2524.           Origami read.
  2525.      kill-count
  2526.           kill-count contains the number of lines, killed by
  2527.           kill-line or copy-to-kill-buffer.
  2528.      move-count
  2529.           move-count contains 0 or 1, depending on the usage
  2530.           of the move-buffer.
  2531.      path-separator
  2532.           path-separator is initialized at startup with  the
  2533.           operations systems path separator (usually '/').
  2534.      file-number
  2535.           file-number is set to the position of the  current
  2536.           file  in  the  list  of edited files.  The list of
  2537.           edited files uses 0.
  2538.      diredit-long
  2539.           diredit-long  controls,  whether  directories  are
  2540.           displayed using dirfold -l.
  2541.      force-bourne-shell
  2542.           If force-bourne-shell is not 0,  /bin/sh  is  used
  2543.           instead  of  the  value  of  environment  variable
  2544.           SHELL.
  2545.  
  2546.      _3._2._7._2.  _g_l_o_b_a_l _i_n_t_e_g_e_r _a_r_r_a_y_s
  2547.      These also have to be declared with defvar:
  2548.      (defvar _d_i_m_e_n_s_i_o_n (_v_a_r_i_a_b_l_e_n_a_m_e ... ))
  2549.           All given _v_a_r_i_a_b_l_e_n_a_m_e are declared as  fields  of
  2550.           _d_i_m_e_n_s_i_o_n  integer  variables.  _d_i_m_e_n_s_i_o_n is a non
  2551.           negative number constant.
  2552.      The following array is always defined:
  2553.      ocl-arg-field
  2554.           The OCL variable ocl-arg-field is defined with di-
  2555.           mension 16.  ocl-arg-field(0) and ocl-argument are
  2556.           the same  variable!   ocl-arg-field(_x),0<_x<16  are
  2557.           initialized   with  0,  unless  -O>_x  is  used  to
  2558.           overwrite.
  2559.  
  2560.      _3._2._7._3.  _p_a_r_a_m_e_t_e_r _v_a_r_i_a_b_l_e_s
  2561.      Variables, declared as arguments for functions, are al-
  2562.      ways local.  Each function call will use another set of
  2563.      variables.
  2564.  
  2565.      _3._2._8.  _V_a_r_i_a_b_l_e _I_n_i_t_i_a_l_i_z_a_t_i_o_n
  2566.  
  2567.  
  2568.  
  2569. Origami 1.6.92             - 41 -               October 1993
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575. User Guide                 - 42 -         Programming in OCL
  2576.  
  2577.  
  2578.      The variables are known for all functions/macros.  They
  2579.      are  initialized  by  0  at startup.  The variable ocl-
  2580.      argument is initialized with -1, if  no  -O  option  is
  2581.      given.   Otherwise  it  is set as the -O options deter-
  2582.      mines:
  2583.      -O [>_o_f_f]<_v_a_l_u_e
  2584.           Change the value of OCL variable  ocl-argument  to
  2585.           the  one  of  ocl-arg-field(_v_a_l_u_e.).   If  >_o_f_f is
  2586.           used, change ocl-arg-field(_o_f_f) instead.
  2587.      -O  [>_o_f_f][=]_v_a_l_u_e
  2588.           Change the value of OCL variable  ocl-argument  to
  2589.           _v_a_l_u_e.  If >_o_f_f is used, change ocl-arg-field(_o_f_f)
  2590.           instead.
  2591.      -O [>_o_f_f]|_v_a_l_u_e
  2592.           Bitwise-Or the value of OCL variable  ocl-argument
  2593.           with  _v_a_l_u_e.   If  >_o_f_f  is  used, change ocl-arg-
  2594.           field(_o_f_f) instead.
  2595.      -O [>_o_f_f]&_v_a_l_u_e
  2596.           Bitwise-And the value of OCL variable ocl-argument
  2597.           with  _v_a_l_u_e.   If  >_o_f_f  is  used, change ocl-arg-
  2598.           field(_o_f_f) instead.
  2599.      -O [>_o_f_f]^_v_a_l_u_e
  2600.           Bitwise-XOr the value of OCL variable ocl-argument
  2601.           with  _v_a_l_u_e.   If  >_o_f_f  is  used, change ocl-arg-
  2602.           field(_o_f_f) instead.
  2603.      -O [>_o_f_f]+_v_a_l_u_e
  2604.           Increment the value of OCL  variable  ocl-argument
  2605.           with  _v_a_l_u_e.   If  >_o_f_f  is  used, change ocl-arg-
  2606.           field(_o_f_f) instead.
  2607.      -O _n_a_m_e[=]_n_u_m_b_e_r
  2608.           If _n_a_m_e is defined as a command line alias in  the
  2609.           current  rc file, the corresponding initialization
  2610.           will be done. If =_n_u_m_b_e_r is  used,  in  the  above
  2611.           mentioned  options  ? can be used to replace _v_a_l_u_e
  2612.           by the command line argument.
  2613.           In aliased commands, you can use another command:
  2614.           @
  2615.                A string given with = will be  added  to  the
  2616.                predefined  history  argument-list.   A empty
  2617.                string will be stored as a single space.
  2618.      Warning: there will be no compile time syntax check for
  2619.      the given aliases!
  2620.  
  2621.      _3._2._9.  _V_a_r_i_a_b_l_e_s _U_s_a_g_e
  2622.  
  2623.      _3._2._9._1.  _T_e_r_m_s
  2624.      Variables can be used to build expressions.  The syntax
  2625.      for  these  expressions,  called _t_e_r_m in this document,
  2626.      is:
  2627.  
  2628.  
  2629. Origami 1.6.92             - 42 -               October 1993
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635. User Guide                 - 43 -         Programming in OCL
  2636.  
  2637.  
  2638.      _b_a_s_i_c | -_t_e_r_m | [+|-|*|div|modulo](_t_e_r_m _t_e_r_m [_t_e_r_m .. ]
  2639.      )
  2640.           A _t_e_r_m can be a _b_a_s_i_c term or a compound term.
  2641.      OCL's _b_a_s_i_c terms are:
  2642.      true
  2643.           evaluates to 1.
  2644.      false
  2645.           evaluates to 0.
  2646.      _n_u_m_b_e_r
  2647.           a signed or unsigned integer constant.
  2648.      "_c_h_a_r
  2649.      C-_x
  2650.           the integer coding of the given character.
  2651.           Warning: the "_c_h_a_r character is read as  a  string
  2652.           with  length  1.   So  _c_h_a_r  must be followed by a
  2653.           space!
  2654.      _n_a_m_e
  2655.           a variable
  2656.      _n_a_m_e ( _t_e_r_m )
  2657.           the _t_e_r_m's entry in array _n_a_m_e (index: 0,1,.. )
  2658.      eval (_s_t_a_t_e_m_e_n_t ... )
  2659.           "(_s_t_a_t_e_m_e_n_t ...  )" is called via subroutine call.
  2660.           If   it  is  ended  with  "return-value-from-macro
  2661.           _t_e_r_m", this value is  used.   Otherwise  a  random
  2662.           value is used as result of this expression.
  2663.      pre (_s_t_a_t_e_m_e_n_t ... ) _t_e_r_m
  2664.           execute (_s_t_a_t_e_m_e_n_t ...  ) and use the  new  values
  2665.           in the evaluation of _t_e_r_m.
  2666.      counter _c_o_n_d_i_t_i_o_n
  2667.           is 1, if the boolean expression evaluates to TRUE,
  2668.           otherwise 0.
  2669.      read-repeat
  2670.           Return the value  accumulated  by  set-argument-x.
  2671.           The  repeated  execution  of  the  command will be
  2672.           stopped. If set-argument-x was not used,  -1  will
  2673.           be returned.
  2674.      store-character
  2675.           Return the ASCII value of the character under  the
  2676.           cursor.
  2677.      fold-comment-start-length
  2678.           Returns the  length  of  the  fold  comment  start
  2679.           string (2, if language Inmos is active).
  2680.      fold-comment-start _t_e_r_m
  2681.           Returns the _t_e_r_ms character of  the  fold  comment
  2682.           start  string  (which  is  replaced  by  '--',  if
  2683.           language Inmos is active). 0 is the first  charac-
  2684.           ter.
  2685.  
  2686.  
  2687. Origami 1.6.92             - 43 -               October 1993
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693. User Guide                 - 44 -         Programming in OCL
  2694.  
  2695.  
  2696.      fold-comment-end-length
  2697.           Returns the length of the fold comment end  string
  2698.           (0, if language Inmos is active).
  2699.      fold-comment-end _t_e_r_m
  2700.           Returns the _t_e_r_ms character of  the  fold  comment
  2701.           end  string  (which is replaced by '', if language
  2702.           Inmos is active). 0 is the first character.
  2703.      fold-mark-begin _t_e_r_m
  2704.      fold-mark-end _t_e_r_m
  2705.      fold-mark-file _t_e_r_m
  2706.      fold-mark-line _t_e_r_m
  2707.           Like fold-comment-start, but uses  the  fold  mark
  2708.           strings.
  2709.      file-type
  2710.           Return a coding for the type of the current editor
  2711.           file.
  2712.           0 for regular file
  2713.           1 for directory
  2714.           -1 for list of edited files
  2715.      set-enter
  2716.           Return number of entered folds.
  2717.      set-space-enter
  2718.           Return the number  of  leading  spaces  hidden  by
  2719.           entering folds.
  2720.      store-line
  2721.           Return the current line number.
  2722.      store-pos
  2723.           Return the x-position of the cursor.  1  is  first
  2724.           displayed  character.   This  may be not the first
  2725.           character on that text line if  you  have  entered
  2726.           indented folds.
  2727.      buffer-from-position _t_e_r_m-_x _t_e_r_m-_y
  2728.           Return the buffer number, using the  screen  posi-
  2729.           tion  (not buffer position) _t_e_r_m-_x/_t_e_r_m-_y.  If the
  2730.           position does not belong to a  buffer,  0  is  re-
  2731.           turned.
  2732.      store-line-mark
  2733.           Return a coding of the current  line.   goto-line-
  2734.           mark can use this value to reach the line, even if
  2735.           the line has been moved in the text.
  2736.      origami functions
  2737.           All Origami commands can be used in  terms.   This
  2738.           is  used  to  set  variables  with  values used in
  2739.           insert-ascii.
  2740.      _o_p(_e_1 _e_2 _e_3 .. ) is evaluated like _o_p(_o_p(_e_1 _e_2)  _e_3  ..
  2741.      ).
  2742.      Warning: The code optimizer (option -O)  modifies  only
  2743.  
  2744.  
  2745. Origami 1.6.92             - 44 -               October 1993
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751. User Guide                 - 45 -         Programming in OCL
  2752.  
  2753.  
  2754.      the  generated  OCL-assembler.   It cannot optimize the
  2755.      structure of terms!  Play with the expressions and  use
  2756.      viewrc if you need fast/short functions/macros.
  2757.  
  2758.      _3._2._9._2.  _V_a_r_i_a_b_l_e _s_t_a_t_e_m_e_n_t_s
  2759.      The following functions deal with  variables/terms  and
  2760.      can  be  used  in the same way like the above mentioned
  2761.      statements:
  2762.      prompt-counter _n_a_m_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  2763.           Prompts _m_e_s_s_a_g_e-_s_t_r_i_n_g below the status  line  and
  2764.           reads the new value for _n_a_m_e from keyboard.  Input
  2765.           _y sets it to 1, _n sets it to 0.  All other  inputs
  2766.           have  to  be  decimals  or  a  simple newline-and-
  2767.           indent.
  2768.           N.B.: This command does not support the full edit-
  2769.           ing   possibilities,   you  can  use  with  normal
  2770.           prompts.  Only the following commands are allowed:
  2771.  
  2772.           delete-previous-character
  2773.           newline-and-indent
  2774.           normal text characters
  2775.  
  2776.           Warning:  if  prompt-counter  is   called   during
  2777.           define-macro  is  active, the given input will not
  2778.           be stored in the macro!  This command does not ac-
  2779.           tivate  the begin- / end-prompt-macro, because you
  2780.           can do it explicitly in the OCL-code.
  2781.      prompt-char-counter _n_a_m_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  2782.           Same as prompt-counter, but the  counter  _n_a_m_e  is
  2783.           set  to  the  ASCII-value of the next pressed key.
  2784.           The value is undefined,  if  the  pressed  key  is
  2785.           bound  to  a  user defined or predefined function.
  2786.           The given input will not  be  interpreted.   So  a
  2787.           given function will not be executed!
  2788.           Warning: if prompt-char-counter is  called  during
  2789.           define-macro  is  active, the given input will not
  2790.           be stored in the macro!  This command does not ac-
  2791.           tivate  the begin- / end-prompt-macro, because you
  2792.           can do it explicitly in the OCL-code.
  2793.      menu-counter _n_a_m_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  2794.           Display _m_e_s_s_a_g_e-_s_t_r_i_n_g as a menu and ask  for  the
  2795.           whished  item.   Items  are  the  space  separated
  2796.           textparts in _m_e_s_s_a_g_e-_s_t_r_i_n_g.  You can  choose  the
  2797.           items  by  typing the first character or by moving
  2798.           with  backward-character  and   forward-character.
  2799.           The currently chosen item is displayed inverse (or
  2800.           trailing <, if  inverse  is  not  possible).   The
  2801.           first  chosen item is given by _n_a_m_e (or 0, if _n_a_m_e
  2802.           is not in the correct range).  _n_a_m_e is set to  the
  2803.           number of the chosen item (0..).
  2804.  
  2805.  
  2806. Origami 1.6.92             - 45 -               October 1993
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812. User Guide                 - 46 -         Programming in OCL
  2813.  
  2814.  
  2815.           Leading spaces in front of the prompt will be cut.
  2816.           _m_e_s_s_a_g_e-_s_t_r_i_n_g  may  not use characters, which are
  2817.           displayed with more  than  one  character  on  the
  2818.           screen (ctrl-chars and tab)!  If the first charac-
  2819.           ter of an item is #, it will be replaced by  space
  2820.           in  the  menu  and  the  item  asks for the space-
  2821.           character.  If the menu string is to long for  the
  2822.           current  screen, it will be cut at the left and/or
  2823.           right end and marked as a long edit line.
  2824.           Warning: if menu-counter is called during  define-
  2825.           macro  is  active,  the  given  input  will not be
  2826.           stored in the macro!  This command  does  not  ac-
  2827.           tivate  the begin- / end-prompt-macro, because you
  2828.           can do it explicitly in the OCL-code.
  2829.      goto-buffer-number _t_e_r_m
  2830.           Switch to buffer _t_e_r_m in the list of used buffers,
  2831.           the  first one is 1.  Uses the order from current-
  2832.           buffer-number.
  2833.      goto-buffer-id _t_e_r_m
  2834.           Switch to the  buffer  with  current-buffer-id  is
  2835.           _t_e_r_m.  The first one is 0.
  2836.      goto _t_e_r_m
  2837.           Move the cursor on  x-position  _t_e_r_m.   1  is  the
  2838.           first displayed character.  If you enter a indent-
  2839.           ed fold, position 1 is not the first character  on
  2840.           that line.
  2841.      goto-counter _t_e_r_m
  2842.           Same as above.
  2843.      goto-line-counter _t_e_r_m
  2844.           Like goto-line.  The line number is the  value  of
  2845.           the expression.
  2846.           Warning: Origami exits entered folds and moves  to
  2847.           the given position.
  2848.           Warning: the line count  begins  at  beginning  of
  2849.           file.   Versions older than 1.6.17 used the top of
  2850.           entered fold as the starting point for counting!
  2851.      goto-line-mark _t_e_r_m
  2852.           Like goto-line-counter, but uses the line  coding,
  2853.           given by a store-line-mark statement, to reach the
  2854.           line directly.  The line will be found, even if it
  2855.           has  been  moved  inside  the text.  Invalid codes
  2856.           will be handled as  if  the  last  line  has  been
  2857.           marked.
  2858.           If OCL varoable modify-behaviour is not 0, and the
  2859.           cursor  is  on  the  destination line, the command
  2860.           will be ignored!
  2861.           Warning: Origami exits entered folds and moves  to
  2862.           the given position.
  2863.  
  2864.  
  2865. Origami 1.6.92             - 46 -               October 1993
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871. User Guide                 - 47 -         Programming in OCL
  2872.  
  2873.  
  2874.           Warning: While a  marked  line  is  inside  kill-,
  2875.           move-  or  delete-buffer, the mark is invalid.  At
  2876.           the time, these lines appear in  the  text  again,
  2877.           the marks become valid again.
  2878.           Warning: Due to memory management of  origami  and
  2879.           its  reusage  of  memory, the handling of marks in
  2880.           the following circumstances is  not  defined  (in-
  2881.           valid marks or marks to random lines!):
  2882.           changing the edit file of an buffer
  2883.           deleting more than 64 lines, and creating new text
  2884.           lines
  2885.           Warning: the line count  begins  at  beginning  of
  2886.           file.   Versions older than 1.6.17 used the top of
  2887.           entered fold as the starting point for counting!
  2888.      counter _t_e_r_m
  2889.           The value of the expression is returned as  ASCII-
  2890.           text.
  2891.      insert-ascii _t_e_r_m
  2892.           Insert the character with ASCII-code given by  the
  2893.           expression  into  the  input  stream.  There is no
  2894.           check whether the given value of name is a correct
  2895.           ascii value.  Do it yourself!
  2896.           This command can also be  used,  to  put  internal
  2897.           OCL-tokens  into  the  token  stream.  This should
  2898.           only used by experienced OCL  programmers!   Using
  2899.           invalid tokens can crash Origami!
  2900.      set _n_a_m_e _t_e_r_m
  2901.           The counter-variable _n_a_m_e is set to the  value  of
  2902.           _t_e_r_m.
  2903.           N.B.: the old name set-counter is also  valid  for
  2904.           compatibility reasons.
  2905.      set _n_a_m_e ( _t_e_r_m_1 ) _t_e_r_m_2
  2906.           The entry _t_e_r_m_1 of array _n_a_m_e is set to the  value
  2907.           of _t_e_r_m_2.
  2908.           N.B.: the old name set-counter is also  valid  for
  2909.           compatibility reasons.
  2910.      set-cursor-line _t_e_r_m
  2911.           Like redraw-display, but uses line _t_e_r_m instead of
  2912.           the current line.
  2913.      return-value-from-macro _t_e_r_m
  2914.           Like return-from-macro, but a calling eval  state-
  2915.           ment can use _t_e_r_m as result.
  2916.      change-fold-type _t_e_r_m _t_e_r_m
  2917.           Uses the first _t_e_r_m as foldtype and the second  as
  2918.           fold  contents  and  changes the attributes of the
  2919.           fold under the cursor.  These values have specific
  2920.           meanings in TDS!  The values of the _t_e_r_ms are used
  2921.  
  2922.  
  2923.  
  2924. Origami 1.6.92             - 47 -               October 1993
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930. User Guide                 - 48 -         Programming in OCL
  2931.  
  2932.  
  2933.           modulo 255.
  2934.      save-and-exit-buffer-code _n_a_m_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  2935.           Like save-and-exit-buffer, but uses value of  OCL-
  2936.           variable  _n_a_m_e  as  exit  code.  _m_e_s_s_a_g_e-_s_t_r_i_n_g is
  2937.           displayed as exit-message.
  2938.  
  2939.      _3._2._1_0.  _C_h_a_r_a_c_t_e_r _s_e_t_s
  2940.      In OCL you can use character sets to  simplify  boolean
  2941.      expressions.  Predefined character sets are:
  2942.  
  2943.           alpha    letters a..z,A..Z
  2944.           upper    uppercase letters A..Z
  2945.           lower    lowercase letters a..z
  2946.           digit    digits 0..9
  2947.           xdigit   digit and letters a..f,A..F
  2948.           alnum    alpha and digit
  2949.           blank    space or tab
  2950.           space    characters generating whitespace
  2951.           print    printing character
  2952.           cntrl    control keys 0 .. 31 and delete key 127
  2953.           graph    not space character
  2954.           punct    punctation character: not alnum, digit or space
  2955.  
  2956.      N.B.: see in  your local 'ctype' documentation for  de-
  2957.      tailed information.
  2958.      You can define your own sets with:
  2959.      (defset _n_a_m_e ( _e_l_e_m_e_n_t ... ))
  2960.           The character set name is declared.  Elements  are
  2961.           all characters given in the _e_l_e_m_e_n_t-list.  _e_l_e_m_e_n_t
  2962.           can be:
  2963.  
  2964.                _n_a_m_e   the name of a known character set
  2965.                "_x     a normal character
  2966.                C-_x    a control character
  2967.  
  2968.      Inside functions/macros you can use defset  as  Origami
  2969.      function:
  2970.      defset _d_e_s_t _s_o_u_r_c_e
  2971.           The value of set _d_e_s_t is overwritten  by  the  set
  2972.           _s_o_u_r_c_e.   _d_e_s_t  has to be a user-defined set.  The
  2973.           predefined sets cannot be redefined.
  2974.  
  2975.      _3._2._1_1.  _B_o_o_l_e_a_n _e_x_p_r_e_s_s_i_o_n_s
  2976.      The boolean expressions _c_o_n_d_i_t_i_o_n mentioned  above  can
  2977.      be:
  2978.      true"
  2979.      false"
  2980.      last-message _m_e_s_s_a_g_e-_n_a_m_e
  2981.           Is true if the last message created  by  a  string
  2982.  
  2983.  
  2984.  
  2985. Origami 1.6.92             - 48 -               October 1993
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991. User Guide                 - 49 -         Programming in OCL
  2992.  
  2993.  
  2994.           from  file msg in the Origami source directory was
  2995.           _m_e_s_s_a_g_e-_n_a_m_e.  A successful test will set the last
  2996.           displayed  message to a dummy value, so that last-
  2997.           message _x will be false until  a  new  message  is
  2998.           displayed.    Using  Origami-messages  in  prompts
  2999.           changes the last displayed message.  The  appendix
  3000.           contains the list of known messages.
  3001.      test-file-changed
  3002.           Is true if the current file has been changed.
  3003.      test-filed
  3004.           Is true if the current line is a file-folded-line.
  3005.      test-fold-line
  3006.           Is true if the current line is a closed-fold-line.
  3007.      test-begin-fold
  3008.           Is true if the current line is the {{{ line  of  a
  3009.           open fold.
  3010.      test-end-fold
  3011.           Is true if the current line is the }}} line  of  a
  3012.           open fold.
  3013.      test-text
  3014.           Is true if the current line is a normal text-line.
  3015.      test-top
  3016.           Is true if the current line is the top of the  en-
  3017.           tered fold.
  3018.      test-bottom
  3019.           Is true if the current line is the bottom  of  the
  3020.           entered fold.
  3021.      test-char _t_e_r_m
  3022.           Is true if the ASCII-value of the character  under
  3023.           the cursor is equal to value of the expression.
  3024.      test-char-less _t_e_r_m
  3025.           Is true if the ASCII-value of the character  under
  3026.           the  cursor  is less than the value of the expres-
  3027.           sion.
  3028.      test-char-greater _t_e_r_m
  3029.           Is true if the ASCII-value of the character  under
  3030.           the  cursor  is  greater than the value of the ex-
  3031.           pression.
  3032.      test-char-set _n_a_m_e
  3033.           Is true if the character under the  cursor  is  in
  3034.           the given character set _n_a_m_e.
  3035.      test-str _m_e_s_s_a_g_e-_s_t_r_i_n_g
  3036.           Is true if the string, beginning at the cursor and
  3037.           _m_e_s_s_a_g_e-_s_t_r_i_n_g are the same.
  3038.      test-language "_x
  3039.      test-language _l_a_n_g_u_a_g_e-_n_a_m_e
  3040.           Is true if _x is the language used by set-language.
  3041.  
  3042.  
  3043.  
  3044. Origami 1.6.92             - 49 -               October 1993
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050. User Guide                 - 50 -         Programming in OCL
  3051.  
  3052.  
  3053.           Instead  of  the single character '_x', you can use
  3054.           the language names, like given in chapter Process-
  3055.           ing Origami Files.
  3056.      [<|<=|=|<>|>=|>]( _t_e_r_m_1 .. _t_e_r_m_N )
  3057.           Is true, if _t_e_r_m_I  _O_P  _t_e_r_m_I+_1  is  true  for  all
  3058.           I=1..N-1.   No  term  is evaluated more than once.
  3059.           If _t_e_r_m_I _O_P _t_e_r_m_I+_1 is false for I, the  following
  3060.           terms are not evaluated.
  3061.      test-begin-line
  3062.           Is true if the cursor is placed on or  before  the
  3063.           first non-space-character of the current line.
  3064.      test-end-line
  3065.           Is true if the cursor is placed  behind  the  last
  3066.           non-space-character of the current line.
  3067.      in-prompt
  3068.           Is true if Origami is not  waiting  for  a  normal
  3069.           edit-character  (for  example when prompting for a
  3070.           filename).
  3071.      test-folding
  3072.           Is true, if Origami is in create-fold or highlight
  3073.           mode.  The OCL variable ocl-argument is set to the
  3074.           value of modify-behaviour at create-fold call.
  3075.      test-overwrite
  3076.           Is true if Origami is in overwrite-mode.
  3077.      test-hash-shift
  3078.           Is true if Origami is in hash-shift mode.
  3079.      test-autosave
  3080.           Is true if Origami is in autosave-mode.
  3081.      test-echo
  3082.           Is true if Origami is in echo-mode.
  3083.      test-view
  3084.           Is true if Origami is in view-mode.
  3085.      test-verbose
  3086.           Is true if Origami is in verbose-mode.
  3087.      test-term [(] _t_e_r_m_i_n_a_l-_n_a_m_e [ ... )
  3088.           Is true, if environment variable TERM  is  set  to
  3089.           one  of  the  given _t_e_r_m_i_n_a_l-_n_a_m_es.  _t_e_r_m_i_n_a_l-_n_a_m_e
  3090.           can be given as identifier or string (with leading
  3091.           ".).   If  _t_e_r_m_i_n_a_l-_n_a_m_e end with a *, the test is
  3092.           true, if TERM starts with  _t_e_r_m_i_n_a_l-_n_a_m_e,  without
  3093.           the *.  The empty list evaluated to FALSE.
  3094.      _t_e_r_m
  3095.           Is true if the given expression evaluates to  non-
  3096.           zero.
  3097.      pre (_s_t_a_t_e_m_e_n_t ... ) _c_o_n_d_i_t_i_o_n
  3098.           The sequence of _s_t_a_t_e_m_e_n_t will be executed  before
  3099.           the evaluation of _c_o_n_d_i_t_i_o_n.
  3100.  
  3101.  
  3102.  
  3103. Origami 1.6.92             - 50 -               October 1993
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109. User Guide                 - 51 -         Programming in OCL
  3110.  
  3111.  
  3112.      not(_c_o_n_d_i_t_i_o_n)
  3113.           The value of _c_o_n_d_i_t_i_o_n is logically negated.
  3114.      and(_c_o_n_d_i_t_i_o_n [ _c_o_n_d_i_t_i_o_n ... ] )
  3115.           Is true if all _c_o_n_d_i_t_i_o_ns are true.
  3116.      or(_c_o_n_d_i_t_i_o_n [ _c_o_n_d_i_t_i_o_n ... ] )
  3117.           Is true if one of the _c_o_n_d_i_t_i_o_ns is true.
  3118.      N.B.: OCL uses short-circuit evaluation for and and or.
  3119.      When Origami is prompting for information (for example,
  3120.      asking to overwrite an  existing  file  during  toggle-
  3121.      create-file-fold),  you  can  just  use the part of OCL
  3122.      also  allowed  in  begin-prompt-macro  and  end-prompt-
  3123.      macro.   For  historical  reasons  it is allowed to use
  3124.      delimiters , in the expression lists for and and or.
  3125.  
  3126.      _3._2._1_2.  _T_h_e _d_i_s_p_l_a_y _a_r_e_a
  3127.      Origami can use a part of the  screen  to  continuously
  3128.      display  a  text in the same manner as the status line.
  3129.      This area cannot be edited with the normal editing com-
  3130.      mands.  The text appears below the status line if it is
  3131.      enabled, with the last line highlighted.  Otherwise the
  3132.      text  appears below the editing area.  Controlling this
  3133.      text display area is restricted to  the  following  OCL
  3134.      statements:
  3135.      set-area _t_e_r_m
  3136.           The OCL expression is used to set the size of  the
  3137.           new area.  If its value is 0, no text area will be
  3138.           displayed.  Otherwise  the  value  determines  the
  3139.           number of lines in the new and empty text area.
  3140.      write-area _v_a_r_i_a_b_l_e _v_a_r_i_a_b_l_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  3141.           Origami uses the variables  as  x-  /  y  position
  3142.           where to write the string _m_e_s_s_a_g_e-_s_t_r_i_n_g.
  3143.  
  3144.      _3._2._1_3.  _U_s_e_r _d_e_f_i_n_e_d _m_o_d_e_s
  3145.      In addition to the predefined modes you can  define  up
  3146.      to  64  new  pairs of strings which can be displayed as
  3147.      modes in the status line:
  3148.      (defmodestring _n_a_m_e _l_o_n_g_s_t_r_i_n_g _s_h_o_r_t_s_t_r_i_n_g)
  3149.           _n_a_m_e is a new mode.  _l_o_n_g_s_t_r_i_n_g  is  displayed  in
  3150.           the  status  line when the mode is active.  If the
  3151.           status line becomes to long, _s_h_o_r_t_s_t_r_i_n_g is  used.
  3152.           _l_o_n_g_s_t_r_i_n_g  and  _s_h_o_r_t_s_t_r_i_n_g  are  normal  strings
  3153.           (length is limited by 16).  _n_a_m_e is a normal iden-
  3154.           tifier.
  3155.      Usermodes are controlled by the following Origami  com-
  3156.      mands.   They can be used as normal Origami commands in
  3157.      every (deffun ... ), (initfun ... ) and (defmac ... ).
  3158.      set-numbered-user-mode _n_a_m_e _t_e_r_m
  3159.           Usermode _n_a_m_e is activated.  At this  point,  _n_a_m_e
  3160.           must  be  defined  as  usermode!  If _t_e_r_m does not
  3161.  
  3162.  
  3163.  
  3164. Origami 1.6.92             - 51 -               October 1993
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170. User Guide                 - 52 -         Programming in OCL
  3171.  
  3172.  
  3173.           evaluate to 0, this value will be displayed  after
  3174.           the mode string.
  3175.      set-user-mode _n_a_m_e
  3176.           Usermode _n_a_m_e is activated.  At this  point,  _n_a_m_e
  3177.           must be defined as user mode!
  3178.      reset-user-mode _n_a_m_e
  3179.           Usermode _n_a_m_e is reset.  At this point, _n_a_m_e  must
  3180.           be defined as user mode!
  3181.  
  3182.      _3._2._1_4.  _M_u_l_t_i_p_l_e _k_e_y_b_o_a_r_d _m_o_d_e_s
  3183.      To create more complex keybindings (for  example  a  vi
  3184.      emulation  with  modes),  OCL offers the possibility to
  3185.      use different keyboard translation tables.  To do this,
  3186.      you must declare the used key tables with:
  3187.      (defmodes (_n_a_m_e ... ))
  3188.           where _n_a_m_e is a normal string.  This  command  has
  3189.           two effects:
  3190.                Keybind initializes  a  key  table  for  each
  3191.                _n_a_m_e.
  3192.           and
  3193.                The macros _n_a_m_e are defined and can  be  used
  3194.                within other macro definitions to switch to a
  3195.                certain keytab.  Like  macros,  defined  with
  3196.                defmac,  they  are  not stored in fixed macro
  3197.                buffers, but you can use them  for  your  one
  3198.                function/macro definitions.
  3199.           N.B.:  the  definition  of  keyboard   translation
  3200.           tables  can be spread over multiple ( defmodes ...
  3201.           ) statements. So the following  OCL  sources  have
  3202.           the same meaning:
  3203.  
  3204.                   ( defmodes (  _k_b_d__1 _k_b_d__2 ) )
  3205.  
  3206.           and
  3207.  
  3208.                   ( defmodes _k_b_d__1 )
  3209.                   ( defmodes _k_b_d__2 )
  3210.  
  3211.      The first defined mode is active when starting Origami.
  3212.      The definition of a declared keyboard can be done with:
  3213.      (mode _n_a_m_e (keybind ... ) ... )
  3214.           All given bindings are put into the  keytable  for
  3215.           <name>.   (keybind  abort  ...  ) must be declared
  3216.           outside any (mode ... ) statement, which means you
  3217.           can only have one abort key for all modes.  If us-
  3218.           ing multiple keyboard modes, no other (keybind ...
  3219.           )  statement is allowed outside (mode ... ) state-
  3220.           ments.
  3221.           Using this statement more than once for a specific
  3222.           keytable  adds  all  given  bindings  to the given
  3223.  
  3224.  
  3225.  
  3226. Origami 1.6.92             - 52 -               October 1993
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232. User Guide                 - 53 -         Programming in OCL
  3233.  
  3234.  
  3235.           mode.
  3236.  
  3237.      _3._2._1_5.  _T_e_r_m_i_n_a_l_s
  3238.      You can configure Origami for  different  terminals  in
  3239.      one  rc  file  by  using  terminal.  Terminal dependent
  3240.      aliases can be declared on toplevel via:
  3241.      (terminal [ ( ] _n_a_m_e [ ... ) ] (alias ... ) ... )
  3242.           The corresponding alias definitions will  be  used
  3243.           for  the  different terminals.  Terminal dependent
  3244.           aliases inside the (alias ...   )  statements  are
  3245.           handled  for each terminal.  The given aliases are
  3246.           internally stored as _t_e_r_m_n_a_m_e@_a_l_i_a_s_n_a_m_e.  Use  au-
  3247.           toalias to generate your alias declarations.
  3248.      Terminal dependent bindings can be used inside and out-
  3249.      side  of  (mode ...  ) statements.  The declaration has
  3250.      to be made like:
  3251.      (terminal [ ( ] _n_a_m_e [ ... ) ] (keybind ... ) ... )
  3252.           The (keybind ... ) commands inside this  statement
  3253.           are  only  active if Origami is used on a terminal
  3254.           named _n_a_m_e (value of environment variable ORIGAMI-
  3255.           TERM  or  TERM).  Used aliases have to be declared
  3256.           globally or must be declared as terminal dependent
  3257.           for  all  named  terminals.  If a alias is not de-
  3258.           clared for one of the given terminals,  the  bind-
  3259.           ings  will not be done for this terminal and a er-
  3260.           rormessage will be printed.
  3261.      Using default as terminalname in (terminal ... ) state-
  3262.      ments  is allowed.  The corresponding binding will only
  3263.      be done for the default-table.
  3264.      Warning: Binding sequences to an as yet not used termi-
  3265.      nal copies the currently known part of the default ter-
  3266.      minal.
  3267.      N.B.: This is not the whole story! we are still  trying
  3268.      to work out how to express this accurately!
  3269.      Some different terminals use  the  same  character  se-
  3270.      quences  for their different keys.  To prevent multiple
  3271.      keytables for these terminals, you can use:
  3272.      (termalias _t_e_r_m_n_a_m_e ( _a_l_i_a_s_t_e_r_m_n_a_m_e ... ))
  3273.           If  $TERM/$ORIGAMITERM  is  set  to  one  of   the
  3274.           _a_l_i_a_s_t_e_r_m_n_a_m_es, the keytable for _t_e_r_m_n_a_m_e is used.
  3275.           If _a_l_i_a_s_t_e_r_m_n_a_m_e ends with *, * matches any text.
  3276.  
  3277.      _3._2._1_6.  _C_o_n_d_i_t_i_o_n_a_l _c_o_m_p_i_l_a_t_i_o_n
  3278.      OCL offers the possibility to use the same  OCL  source
  3279.      for  different  keybindings  by using the commands @if-
  3280.      using and @use to control the compilation  of  the  OCL
  3281.      source.   Some parts of the source will be handled like
  3282.      comments (like #if .. #endif in C).
  3283.      @use ( _n_a_m_e ... )
  3284.  
  3285.  
  3286. Origami 1.6.92             - 53 -               October 1993
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292. User Guide                 - 54 -         Programming in OCL
  3293.  
  3294.  
  3295.           From now on the identifiers _n_a_m_e ... are known  as
  3296.           set tags.
  3297.      @use not( _n_a_m_e ... )
  3298.           From now on the identifiers _n_a_m_e ... are not known
  3299.           as set tags.
  3300.      @if-using ( _t_a_g ... ) _s_t_a_t_e_m_e_n_t ...  @fi
  3301.           The list of statements will only  be  compiled  if
  3302.           one of the tags is set.
  3303.      @if-using not( _t_a_g ... )  _s_t_a_t_e_m_e_n_t ...  @fi
  3304.           The list of statements will only  be  compiled  if
  3305.           none of the tags is set.
  3306.      Warning: if a filed fold  appears  inside  @if-using  (
  3307.      _n_o_t-_d_e_f_i_n_e_d-_t_a_g  ),  the fold will not be read to speed
  3308.      up compilation.  In this way it is impossible to  start
  3309.      a @if-using-block in one file and end it in another !
  3310.  
  3311.      _3._2._1_7.  _S_p_e_c_i_a_l _c_o_m_m_a_n_d_s
  3312.      (mode-limiter _c_h_a_r)
  3313.           The character, which is used to limit the modes is
  3314.           replaced by _c_h_a_r.  This overwrites changes made in
  3315.           the .origamimsg file.
  3316.      (line-limiter _c_h_a_r)
  3317.           The character, which is used to mark long lines is
  3318.           replaced by _c_h_a_r.  This overwrites changes made in
  3319.           the .origamimsg  file.   This  character  is  also
  3320.           used, to mark cut strings in language User.
  3321.      (shift-mark _c_h_a_r)
  3322.           The character, which is used to mark lines, shift-
  3323.           ed  to  the left.  This overwrites changes made in
  3324.           the .origamimsg file.  If  shift-mark  is  set  to
  3325.           space, no marks are printed!
  3326.      (os-extension ( _e_l_e_m_e_n_t ... ))
  3327.           Keybind generates a rc-file entry, containing  the
  3328.           given text.  The standard UN*X Origami will ignore
  3329.           these  entries,  but  special  ports  to  non-UN*X
  3330.           operating-systems  may use these entries for their
  3331.           own purposes.  _e_l_e_m_e_n_t can be:
  3332.           _s_t_r_i_n_g
  3333.           _f_u_n_c_t_i_o_n-_n_a_m_e
  3334.                will be replaced by the used macro place!
  3335.           history _h_i_s_t_o_r_y-_n_a_m_e
  3336.                will be replaced by the internal history id!
  3337.           mode _n_a_m_e
  3338.                will be replaced  by  the  internal  keyboard
  3339.                number (0,1,..)!
  3340.      @rc-comment _t_e_x_t
  3341.           All text following @rc-comment up to  the  end  of
  3342.  
  3343.  
  3344.  
  3345. Origami 1.6.92             - 54 -               October 1993
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351. User Guide                 - 55 -         Programming in OCL
  3352.  
  3353.  
  3354.           line will be put unchanged into the rc-file.  Ori-
  3355.           gami always ignores this rc-file entry.
  3356.      @error _t_e_x_t
  3357.           Generate a compilation  error.   Report  all  _t_e_x_t
  3358.           following  @error  up  to  the  end of the line as
  3359.           error-message.
  3360.      @line _l_i_n_e _n_u_m_b_e_r
  3361.           Sets the line position in the current file to _l_i_n_e
  3362.           _n_u_m_b_e_r.   Useful for OCL-filters, which add/delete
  3363.           lines in the OCL source.
  3364.      The  following  functions  are  special  commands,  for
  3365.      internal  use.  Only experienced OCL programmers should
  3366.      use these functions.  They can be bound to keysequences
  3367.      (except   echo-byte,  echo-string,  save-buffer-layout,
  3368.      restore-buffer-layout, pop-delete-buffer,history,  get-
  3369.      history and history-edit) or used in functions/macros.
  3370.      echo-byte _t_e_r_m
  3371.           echo-byte ignores  screen-off,screen-on  and  send
  3372.           byte _t_e_r_m to stdout (terminal).
  3373.      echo-string _m_e_s_s_a_g_e-_s_t_r_i_n_g
  3374.           Like  echo-byte,  but  send  the  string  _m_e_s_s_a_g_e-
  3375.           _s_t_r_i_n_g.
  3376.      history _h_i_s_t_o_r_y-_n_a_m_e
  3377.           Do not use the  default  histories  for  prompting
  3378.           commands.  The  default history is replaced by the
  3379.           history _h_i_s_t_o_r_y-_n_a_m_e. Predefined are:
  3380.  
  3381.           name:           history, used in:
  3382.           search          search-forward, ..
  3383.           replace         replace-string, ..
  3384.           misc            goto-line, ..
  3385.           file            read-file, ..
  3386.           shell           shell, ..
  3387.           error-list      error messages are stored here
  3388.           argument-list   list of aliased command line arguments
  3389.           match           used for -f in directory edit mode.
  3390.           no-match        used for -F in directory edit mode.
  3391.           none            no history
  3392.           default         use standard histories
  3393.  
  3394.           Other   histories   are   declared   outside    of
  3395.           functions/macros with:
  3396.           ( history _h_i_s_t_o_r_y-_n_a_m_e )
  3397.      history-edit _h_i_s_t_o_r_y-_n_a_m_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  3398.           Prompt for a string and use history _h_i_s_t_o_r_y-_n_a_m_e.
  3399.      history-edit-line _h_i_s_t_o_r_y-_n_a_m_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  3400.           Like history-edit, but the prompt  is  initialized
  3401.           with the current line and cursor position.  Spaces
  3402.           from entered folds are skipped.
  3403.  
  3404.  
  3405. Origami 1.6.92             - 55 -               October 1993
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411. User Guide                 - 56 -         Programming in OCL
  3412.  
  3413.  
  3414.      history-edit-filename _h_i_s_t_o_r_y-_n_a_m_e _m_e_s_s_a_g_e-_s_t_r_i_n_g
  3415.           Like history-edit, but the prompt  is  initialized
  3416.           with the current filename.
  3417.      get-history _h_i_s_t_o_r_y-_n_a_m_e _t_e_r_m
  3418.           Insert a string  from  history  list  _h_i_s_t_o_r_y-_n_a_m_e
  3419.           into  the  input stream.  _t_e_r_m gives the number of
  3420.           the chosen item (0 is newest,  1  is  one  before,
  3421.           ...).
  3422.      N.B.: histories can be used as string variables.
  3423.      pop-delete-buffer
  3424.           Remove the  last  deleted  line  from  the  delete
  3425.           buffer. There is no undo for this action.
  3426.      screen-off
  3427.           Turn off the screen display.  If keyboard input is
  3428.           expected and the screen is switched off, the abort
  3429.           key  is  automatically  invoked  and  the  display
  3430.           turned on again.
  3431.      screen-on
  3432.           Turn on the screen  display.   You  have  to  call
  3433.           redraw-display yourself.
  3434.      save-buffer-layout
  3435.           Saves the current window positions.  There  is  no
  3436.           stack,  so  using this command more than once will
  3437.           overwrite the data.
  3438.      restore-buffer-layout
  3439.           Try to restore the buffer sizes and  positions  to
  3440.           the  ones,  saved  by  the last save-buffer-layout
  3441.           command.   The  screen  will  be  refreshed.   New
  3442.           buffers always set their saved size to 0 lines and
  3443.           0 columns.  However,  the  minimum  size  for  the
  3444.           current buffer is 5 lines and 16 columns.
  3445.      refresh-line
  3446.           Refresh the  current  line.   screen-off/screen-on
  3447.           can  be  used  for single line operations, without
  3448.           redrawing the complete screen.
  3449.      There are a special OCL commands, which can be used  to
  3450.      load/remove demand loaded macros:
  3451.      load-function ( _n_a_m_e .. )
  3452.           Tries to load all named functions. May be used  to
  3453.           speed up libraries, using many demand loaded func-
  3454.           tions.
  3455.      load-function not( _n_a_m_e .. )
  3456.           Remove the functions _n_a_m_e .., if they are a demand
  3457.           loaded.   If one of the functions is needed again,
  3458.           it will be loaded automatically.
  3459.           Warning: there  are  no  test,  if  the  macro  is
  3460.           currently  in use.  Origami may die, if you remove
  3461.           a used macro!
  3462.  
  3463.  
  3464.  
  3465. Origami 1.6.92             - 56 -               October 1993
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471. User Guide                 - 57 -         Programming in OCL
  3472.  
  3473.  
  3474.      _3._2._1_8.  _R_e_f_e_r_e_n_c_e_s
  3475.      The following command can be used to generate addition-
  3476.      al text files while compiling new binding:
  3477.      @reference-begin
  3478.        <comments>
  3479.            :
  3480.      @reference-end
  3481.           If the command line option -r_r_e_f_e_r_e_n_c_e_f_i_l_e is  ac-
  3482.           tive, all comments will be put into _r_e_f_e_r_e_n_c_e_f_i_l_e.
  3483.           The   text   between   the   @reference-begin    /
  3484.           reference-end  marks  will  not  be  parsed as OCL
  3485.           code, so that the commands must appear at the  be-
  3486.           ginning  of  a line and must be followed by a new-
  3487.           line.  If the command line option  -R  is  active,
  3488.           the  data will copied to the rc file.  Origami can
  3489.           display it with help,  if  no  other  helpfile  is
  3490.           given.   The lines are cut, if they have more than
  3491.           256 characters.
  3492.      The next command can be used, to store  different  help
  3493.      pages in the rc file:
  3494.      @reference-begin-class name
  3495.        <comments>
  3496.            :
  3497.      @reference-end
  3498.           All comments will be put into the  rc  file.   The
  3499.           text   can   be  read  by using help, if OCL vari-
  3500.           able modify-behaviour  is  set  to  _n_a_m_e  (keybind
  3501.           creates  a  constant integer value for _n_a_m_e).  In-
  3502.           stead of symbolic names, you can also use  integer
  3503.           constants _n_u_m_b_e_r (1<=_n_u_m_b_e_r<=8192).  The lines are
  3504.           cut, if they have more than 256 characters.
  3505.      Origami  compresses   the   references   or   describe-
  3506.      bindings-data, before adding them to the rc-file. There
  3507.      is a default list of words, which will be stored with a
  3508.      2  byte  coding.  The following command can be used, to
  3509.      modify this list.
  3510.      ( reference-compress [set] ( _s_t_r_i_n_g .. ) )
  3511.           All strings _s_t_r_i_n_g will be added to  the  list  of
  3512.           compression  words.  If set is used, the list will
  3513.           be set  to  the  empty  list,  before  adding  the
  3514.           strings.
  3515.           N.B.:  there  can  be  more  than  one  reference-
  3516.           compress commands in a OCL source.
  3517.           N.B.: the words are tested in the order  of  their
  3518.           appearance,  so prefixes of longer words should be
  3519.           defined after the definition of their extensions.
  3520.  
  3521.      _3._3.  _O_C_L _e_x_a_m_p_l_e_s
  3522.      This section includes some commented OCL  examples  for
  3523.      you to browse through before starting your own applica-
  3524.  
  3525.  
  3526. Origami 1.6.92             - 57 -               October 1993
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532. User Guide                 - 58 -         Programming in OCL
  3533.  
  3534.  
  3535.      tions.  It is assumed that you are familiar  with  Ori-
  3536.      gami before you start programming in OCL.
  3537.  
  3538.      _3._3._1.  _B_i_n_d_i_n_g_s _k_e_y_s
  3539.      The following examples show how you can  bind  commands
  3540.      to (sequences of) keys and how aliases work.
  3541.  
  3542.              ; This is a simple keybind file
  3543.              (keybind newline-and-indent C-M)
  3544.  
  3545.      The  operation  `newline-and-indent'  is  activated  by
  3546.      pressing  the key C-M.  The line `newline-and-indent C-
  3547.      M' will be included  in  the  keybinding  help  screens
  3548.      available  to  the user.  You can achieve the same key-
  3549.      binding by using an alias:
  3550.  
  3551.              ; This keybinding uses alias
  3552.              (alias enter C-M)
  3553.              (keybind newline-and-indent $enter)
  3554.  
  3555.      The operation `newline-and-indent' is activated by  C-M
  3556.      as  before; the keybinding help will show `newline-and-
  3557.      indent enter'.  If your terminal sends an  unusual  se-
  3558.      quence  of  characters for the enter key instead of the
  3559.      C-M character (very rare), you would just  define  your
  3560.      own  alias  for $enter and leave the comprehensive key-
  3561.      bind command unchanged.
  3562.  
  3563.      _3._3._2.  _A _s_m_a_l_l _f_u_n_c_t_i_o_n
  3564.      The first OCL example does not use any  control  struc-
  3565.      tures.   It  defines  a macro named byebye.  You should
  3566.      play a little with such functions/macros to get used to
  3567.      the compilation process and its (error) messages.
  3568.  
  3569.              ; this is an example for a function definition:
  3570.              ( defmac byebye
  3571.                 ( end-of-fold
  3572.                   beginning-of-line
  3573.                   newline-and-indent
  3574.                   previous-line
  3575.                   "end "  "of " "text
  3576.                 )
  3577.              )
  3578.  
  3579.              (keybind byebye (M-"x "b "y "e))
  3580.  
  3581.      byebye creates a new line containing end of text at the
  3582.      end of the entered fold.
  3583.  
  3584.      _3._3._3.  _R_e_v_i_s_i_o_n _c_o_n_t_r_o_l _s_y_s_t_e_m
  3585.      Two more little functions deal with RCS.  Note that the
  3586.      check out function is only for personal use of RCS.  If
  3587.      you are working in a group, someone else may have edit-
  3588.  
  3589.  
  3590. Origami 1.6.92             - 58 -               October 1993
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596. User Guide                 - 59 -         Programming in OCL
  3597.  
  3598.  
  3599.      ed  the  file, which will not change your own read only
  3600.      copy.  The advantage is that you can visit a  file  and
  3601.      decide if you want to change it.
  3602.  
  3603.              (deffun check-out (
  3604.                if not(in-prompt)
  3605.                (
  3606.                  delete-mode-view
  3607.                  shell-command "co "  "-l "  "$ORIGAMIFILE
  3608.                )
  3609.                fi
  3610.              ))
  3611.  
  3612.              (deffun check-in (
  3613.                if not(in-prompt)
  3614.                (
  3615.                  save-file
  3616.                  add-mode-view
  3617.                  shell-command "ci "  "-u "  "$ORIGAMIFILE
  3618.                )
  3619.                fi
  3620.              ))
  3621.  
  3622.  
  3623.      _3._3._4.  _M_T_o_o_l-_v_e_r_s_i_o_n _o_f _t_o_p-_o_f-_f_o_l_d
  3624.      This a user defined function,  simulating  the  command
  3625.      top-of-fold  as  it  is  used in the mtool system.  The
  3626.      cursor moves to the begin of the currently opened fold.
  3627.  
  3628.              ; example for a more complex function
  3629.              (deffun mtool-top
  3630.              (
  3631.                if test-end-fold (previous-line) fi
  3632.                while and(not(test-begin-fold),not(test-top))
  3633.                (
  3634.                  if test-end-fold (mtool-top) fi
  3635.                  previous-line
  3636.                )
  3637.              ))
  3638.  
  3639.      While the cursor is not being located on top of a  fold
  3640.      (entered  or  opened)  the  cursor is moved up.  If the
  3641.      function finds the end of fold line from another opened
  3642.      fold,  this  fold  is  skipped  by  a recursive call of
  3643.      mtool-top.
  3644.  
  3645.      _3._3._5.  _F_i_l_l _p_a_r_a_g_r_a_p_h
  3646.      The next example function is a bit more  advanced.   It
  3647.      is  too lengthy to include it here, but it can be found
  3648.      in the file fill-paragraph.
  3649.      fill-paragraph fills all lines from cursor position  to
  3650.      the  next line with a blank (or a dot in ``roff-mode'')
  3651.      in the first column.  Not text lines and line, starting
  3652.  
  3653.  
  3654. Origami 1.6.92             - 59 -               October 1993
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660. User Guide                 - 60 -         Programming in OCL
  3661.  
  3662.  
  3663.      wtih fold-comment-start string stop r filling too.  The
  3664.      first column of a line is here the first  character  in
  3665.      currently  entered  fold,  not  opened fold!  Filling a
  3666.      line means to add words from the next line if it is too
  3667.      short  or  to  put  words  to the next line if it is to
  3668.      long.  The default right margin is set  to  column  72.
  3669.      If  there  are  unfillable  lines, fill-paragraph stops
  3670.      filling and complains.  Fill-column counts from  begin-
  3671.      ning of entered fold indentation.
  3672.      The filling can be done in the following 2 ways:
  3673.  
  3674. block-mode
  3675.      All `` '' are expanded to ``  '', till the line reaches
  3676.      the fill margin.
  3677.  
  3678. shrink-mode
  3679.      All ``  '' are replaced by `` '' and the  right  margin
  3680.      remains  unaligned  or ragged.  If language Roff is ac-
  3681.      tive, ``. '' is replaced by ``.  ''.
  3682.  
  3683. The function set-fill-mode switches between these modes.
  3684.  
  3685. The function auto-wrap can be used instead of `` ''.  If the
  3686. cursor  is  at  end  of  line,  the  currently typed word is
  3687. automatically wrapped into a new line.
  3688.  
  3689. The function set-fill-column allows to change the right mar-
  3690. gin.  To do so, you can either use a numeric argument, point
  3691. to the position of the new right margin with the  cursor  or
  3692. make  Origami  prompt for the new column width by moving the
  3693. cursor to the left margin.
  3694.  
  3695. _3._3._6.  _G_o_t_o _m_a_t_c_h_i_n_g _f_e_n_c_e
  3696.  
  3697. If you are writing programs, you often want  to  know  which
  3698. parentheses   match  in  a  complicated  expression.   goto-
  3699. matching-fence performs this function.  It uses the  charac-
  3700. ter  under  the cursor to determine if you are looking for a
  3701. round, square or curly bracket and if you want  to  jump  to
  3702. the  opening  or  the  closing  one.   If  the cursor is not
  3703. located on a bracket, nothing will  happen.   Otherwise  the
  3704. function searches the matching fence.  If it cannot find it,
  3705. it will move back to your old position.  If necessary,  this
  3706. function  opens  and  closes folds.  Do not worry if it does
  3707. not seem to stop searching.  If your text is very  long  and
  3708. there is no fitting fence, you will be amazed how many folds
  3709. you are using and how fast they can be  opened  and  closed,
  3710. but  usually  goto-matching-fence  will  exit  gracefully at
  3711. last.  Remember the operation can also be interrupted by the
  3712. abort character (often bound to C-G).
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718. Origami 1.6.92             - 60 -               October 1993
  3719.  
  3720.  
  3721.  
  3722.  
  3723.  
  3724. User Guide                 - 61 -         Programming in OCL
  3725.  
  3726.  
  3727. _3._3._7.  _T_h_e _t_o_w_e_r_s _o_f _h_a_n_o_i
  3728.  
  3729. This is a funny function to demonstrate the  power  of  OCL.
  3730. You should type a string of a few characters without blanks,
  3731. then start this function and have fun.
  3732.  
  3733. Warning: If you type more than about eight  to  ten  charac-
  3734. ters, the game will require a long time.
  3735.  
  3736. _3._3._8.  _C_o_n_d_i_t_i_o_n_a_l _c_o_m_p_i_l_a_t_i_o_n
  3737.  
  3738. A simple example for the usage of conditional compilation:
  3739.  
  3740.         @if-using (foo)
  3741.           ...  block
  3742.         @fi
  3743.  
  3744. `...  block' will only be compiled if the tag _f_o_o  is  known
  3745. as  used.   This  can be done by an earlier @use (_f_o_o) or by
  3746. the commandline option -U_f_o_o.
  3747.  
  3748. Another example shows the usage of  conditional  compilation
  3749. to prevent multiple compilation of a file:
  3750.  
  3751.         @if-using not(FILENAME)
  3752.           @use (FILENAME)
  3753.           ...  block
  3754.         @fi
  3755.  
  3756.  
  3757. This technique is used in the library files in the  bindings
  3758. directory.
  3759.  
  3760. The following example shows, how different keyboards,  func-
  3761. tion  and  macro  sets etc. can be handled properly with one
  3762. OCL source.  You need only one tag  to  choose  the  correct
  3763. environment.   This  can  be  done either by an earlier @use
  3764. (??) or by the command switch -U??.
  3765.  
  3766.         {{{  choose correct compilation tags
  3767.         @if-using (kbd_1_macros_1)
  3768.           @use ( kbd_1 mac_1 )
  3769.         @fi
  3770.         @if-using (kbd_2_macros_1)
  3771.           @use ( kbd_2 mac_1 )
  3772.         @fi
  3773.         ; you can write such statements as well:
  3774.         @if-using (kbd_1_macros_2) @use ( kbd_1 mac_2 ) @fi
  3775.         @if-using (kbd_2_macros_2) @use ( kbd_2 mac_2 ) @fi
  3776.         @if-using ( kbd_2_c ) @use (kbd_2 c_macs mac_1) @fi
  3777.         }}}
  3778.  
  3779.  
  3780.  
  3781.  
  3782.  
  3783.  
  3784. Origami 1.6.92             - 61 -               October 1993
  3785.  
  3786.  
  3787.  
  3788.  
  3789.  
  3790. User Guide                 - 62 -         Programming in OCL
  3791.  
  3792.  
  3793.  
  3794.         {{{  macros
  3795.         ...  simple macros
  3796.         @if-using (mac_2)
  3797.           ...F special tex macros
  3798.         @fi
  3799.         @if-using (mac_1)
  3800.           ...F text edit helps
  3801.         @fi
  3802.         @if-using (c_macs)
  3803.           ...F c_macros
  3804.         @fi
  3805.         }}}
  3806.  
  3807.  
  3808.         {{{  keyboard mapping
  3809.         ...  terminal_keymap (esc,shift,ctrl ... )
  3810.         @if-using (kbd_1)
  3811.           ...F simple_keys (cursor- and functionkeys)
  3812.         @fi
  3813.         @if-using (kbd_2)
  3814.           ...F more_complex_keys (cursor- and functionkeys)
  3815.         @fi
  3816.         }}}
  3817.  
  3818. The usage of more descriptive  identifiers  is  left  as  an
  3819. exercise for the reader.
  3820.  
  3821. _3._3._9.  _L_i_b_r_a_r_i_e_s
  3822.  
  3823. To use a library file, you can use  the  following  3  tech-
  3824. niques:
  3825.  
  3826.         ; to include the file filename
  3827.         ; in the current directory:
  3828.         ...F filename
  3829.  
  3830. or
  3831.  
  3832.         ; to include the file filename
  3833.         ; in the current directory:
  3834.         @include filename
  3835.  
  3836. or
  3837.  
  3838.         ; to include a file filename
  3839.         ; in directory dir (dir is part of
  3840.         ; the keybind library path):
  3841.         @lib filename
  3842.  
  3843.  
  3844. _3._3._1_0.  _M_o_d_e_s _a_n_d _t_e_r_m_i_n_a_l_s
  3845.  
  3846. A simple example for the usage of multiple keyboards is  the
  3847.  
  3848.  
  3849.  
  3850. Origami 1.6.92             - 62 -               October 1993
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856. User Guide                 - 63 -         Programming in OCL
  3857.  
  3858.  
  3859. following:
  3860.  
  3861.  
  3862.         (defmodes edit shell)
  3863.  
  3864.  
  3865.         ( deffun shell-commands ( add-mode-view shell ) )
  3866.         ( deffun editing ( delete-mode-view edit ) )
  3867.         ( abort-macro editing )
  3868.  
  3869.  
  3870.         (mode edit
  3871.           ...  bind all normal edit commands
  3872.           ( keybind shell-commands ( .. ) )
  3873.         )
  3874.  
  3875.  
  3876.         (mode shell
  3877.           ...  bind commands calling special shell scripts
  3878.           ( keybind editing       ( .. ) )
  3879.         )
  3880.  
  3881.  
  3882.         ...  some other macros
  3883.         (mode shell    ; mode is splitted in 2 definitions
  3884.           ...  bind commands calling special shell-scripts,part 2
  3885.         )
  3886.  
  3887. This enables you to use all normal characters for your shell
  3888. commands or predefined system calls.
  3889.  
  3890. Another example shows the usage of terminal dependent  bind-
  3891. ings.
  3892.  
  3893.         (defmodes keyboard)
  3894.         ...  aliases for SUN-keyboard
  3895.         ...  aliases for PC-keyboard
  3896.         (mode keyboard
  3897.           ...  all normal edit commands
  3898.           ( terminal SUN
  3899.              ...  all SUN keyboard function keys
  3900.           )
  3901.           ( terminal PC
  3902.              ...  all PC keyboard function keys
  3903.           )
  3904.         )
  3905.  
  3906.  
  3907. Origami loads only one of the given tables, depending on the
  3908. value  of  $ORIGAMITERM or $TERM.  The default keyboard uses
  3909. none of the additional bindings.
  3910.  
  3911. The following is an example for using terminal  dependencies
  3912. for aliases too:
  3913.  
  3914.  
  3915.  
  3916. Origami 1.6.92             - 63 -               October 1993
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922. User Guide                 - 64 -         Programming in OCL
  3923.  
  3924.  
  3925.  
  3926.         (defmodes keyboard)
  3927.  
  3928.  
  3929.         {{{  aliases for SUN keyboard - autoalias
  3930.         ; created with 'autoalias -tsun'
  3931.         ( terminal sun
  3932.            ( alias up ( ... ) )
  3933.            ...
  3934.         )
  3935.         }}}
  3936.         ...  aliases for PC keyboard  - hand coded
  3937.  
  3938.  
  3939.         (mode keyboard
  3940.           ...  all normal edit commands
  3941.           ( terminal ( sun PC )
  3942.              ( keybind previous-line ( $up ) )
  3943.                ; instead of $up, $sun@up and $PC@up
  3944.                ; will be used in the two tables
  3945.              ...
  3946.           )
  3947.         )
  3948.  
  3949.  
  3950. _3._3._1_1.  _C_o_m_m_a_n_d _l_i_n_e _o_p_t_i_o_n_s, _h_o_o_k_s
  3951.  
  3952. This example shows, how complex bindings can use  their  own
  3953. command line options.  It also shows, how the semantics of a
  3954. predefined command can be changed.   The  new  command  line
  3955. options nohigh, high, stat and nostat are defined to be used
  3956. with -O to enable, disable the highlighting while creating a
  3957. fold and the display of the statusline.
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.  
  3980.  
  3981.  
  3982. Origami 1.6.92             - 64 -               October 1993
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988. User Guide                 - 65 -         Programming in OCL
  3989.  
  3990.  
  3991.  
  3992.         {{{  names and modes
  3993.         ( defbinding
  3994.            Example
  3995.            ( "high "|1^1 ) ( "nohigh "|1   )
  3996.            ( "stat "|2^2 ) ( "nostat "|2   )
  3997.               ; use bits 0,1 for the two modes
  3998.               ; FALSE=default=display on
  3999.         )
  4000.         }}}
  4001.         {{{  variables
  4002.         ( defvar ( startup no-highlighting ) )
  4003.         }}}
  4004.         {{{  mode highlighting
  4005.         ( deffun add-mode-highlighting
  4006.            ( set no-highlighting 0 )
  4007.         )
  4008.         ( deffun delete-mode-highlighting
  4009.            ( set no-highlighting 1 )
  4010.         )
  4011.         }}}
  4012.         {{{  create-fold
  4013.         ( defmac create-fold-orig ( create-fold ) )
  4014.         ( undeclare ( create-fold ) )
  4015.         ( deffun create-fold
  4016.            ( local
  4017.               ( modify-behaviour )
  4018.               ( if and(no-highlighting =(0 modify-behaviour))
  4019.                  ( set modify-behaviour 5 )
  4020.                 fi
  4021.                   ; change only, if default
  4022.                   ; create-fold should be used!
  4023.                 create-fold
  4024.               )
  4025.            )
  4026.         )
  4027.         ( undeclare ( create-fold-orig ) )
  4028.         }}}
  4029.         {{{  startup macro
  4030.         ( demand-load
  4031.            (
  4032.              .
  4033.              {{{  startup-fun
  4034.              ( deffun startup-fun
  4035.                 ( if <>(ocl-argument -1)
  4036.                    ( set startup ocl-argument )
  4037.                        ; ocl-argument set by -O
  4038.                   fi
  4039.                   .
  4040.                   {{{  handle bit 2, 0=statusline on
  4041.                   if >=(startup 2)
  4042.                    ( set startup -(startup 2)
  4043.                      statusline-off
  4044.                    )
  4045.  
  4046.  
  4047.  
  4048. Origami 1.6.92             - 65 -               October 1993
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054. User Guide                 - 66 -         Programming in OCL
  4055.  
  4056.  
  4057.                   else
  4058.                    ( statusline-on )
  4059.                   fi
  4060.                   }}}
  4061.                   .
  4062.                   .
  4063.                   {{{  handle bit 1, 0=highlighting on
  4064.                   if >(startup 0)
  4065.                    ( add-mode-highlighting )
  4066.                   else
  4067.                    ( delete-mode-highlighting )
  4068.                   fi
  4069.                   }}}
  4070.                   .
  4071.                   .
  4072.                   if test-term my-old-slow-terminal
  4073.                    ( delete-mode-highlighting )
  4074.                   fi
  4075.                   .
  4076.                   set startup 0
  4077.                 )
  4078.              )
  4079.              }}}
  4080.              .
  4081.            )
  4082.         )
  4083.         }}}
  4084.         {{{  read-new-file-macro
  4085.         ( deffun read-newfile-hook
  4086.            ( if =(startup 0) ( startup-1 ) fi
  4087.              ...  any code for new file handling
  4088.              if =(startup 0)
  4089.               ( set startup 1
  4090.                 load-function not(startup-fun
  4091.               )
  4092.              fi
  4093.            )
  4094.         )
  4095.         ( read-newfile-macro read-newfile-hook )
  4096.         }}}
  4097.         {{{  abort-macro
  4098.         ( deffun abort-hook ( set modify-behaviour 0 ) )
  4099.         ; maybe you hit abort, while the modified
  4100.         ; create fold command is active!
  4101.         ( abort-macro abort-hook )
  4102.         }}}
  4103.         :   ; your stuff
  4104.  
  4105.  
  4106. These examples should give an impression of what can be done
  4107. using  OCL.   There  are more functions/macros stored in the
  4108. bindings directory.  I am sure that  you  will  invent  more
  4109. useful  OCL functions/macros.  If you wrote a really new and
  4110. good  one,  please  post  it   to   the   USENET   newsgroup
  4111.  
  4112.  
  4113.  
  4114. Origami 1.6.92             - 66 -               October 1993
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120. User Guide                 - 67 -         Programming in OCL
  4121.  
  4122.  
  4123. comp.editors.
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180. Origami 1.6.92             - 67 -               October 1993
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186. User Guide                 - 68 -            Mouse extension
  4187.  
  4188.  
  4189. _4.  _M_o_u_s_e _e_x_t_e_n_s_i_o_n
  4190.  
  4191. On some systems, Origami can be used with a mouse.  The  rc-
  4192. file  format  is independent from mouse-support.  If Origami
  4193. is not able to support the mouse, the corresponding informa-
  4194. tion in the rc-file is ignored!
  4195.  
  4196. _4._1.  _A_v_a_i_l_a_b_l_e _i_m_p_l_e_m_e_n_t_a_t_i_o_n_s
  4197.  
  4198. Origami can be used with a mouse  in  the  following  window
  4199. environments:
  4200.  
  4201. _4._1._1.  _X
  4202.  
  4203. Defining the symbol XTERM at compile time enables the  mouse
  4204. support for X.  Running Origami inside a xterm will activate
  4205. _s_e_n_d _m_o_u_s_e _p_o_s_i_t_i_o_n _o_n _c_l_i_c_k by  sending  '\033[?9s\033[?9h'
  4206. to the terminal and resetting afterwards.  You can use up to
  4207. 10 mouse buttons.  They are named Button1 .. Button10 in the
  4208. bindinglist.   The  mouse  will  only  be  activated, if the
  4209. environment variable TERM is set to xterm or  xterm_x_x_x,  _x_x_x
  4210. any  text.   Pressing  the  mouse  will activate the Origami
  4211. actions.
  4212.  
  4213. Cut/Paste function can be reached (on a standard xterm)  via
  4214. shift  mouse  button.   See in your xterm- and X manuals for
  4215. more details about mapping the mouse keys.  Use TERM to con-
  4216. trol the loading of different keytables for different termi-
  4217. nals!
  4218.  
  4219. If Origami is used in an xterm, you can use the command line
  4220. option  -T  _t_i_t_l_e  to change the window title to the current
  4221. filename.  After exiting Origami, the title is set to _t_i_t_l_e.
  4222. If _t_i_t_l_e is the empty string, xterm is used.
  4223.  
  4224. After reading the window size  once  from  termcap/terminfo,
  4225. Origami uses xterm escape sequences to get the windowsize.
  4226.  
  4227. _4._1._2.  _M_G_R
  4228.  
  4229. Defining the Symbol MGR at  compiletime  enables  the  mouse
  4230. support  for  the Bellcore window manager MGR.  Running Ori-
  4231. gami  will  activate  _s_e_n_d  _m_o_u_s_e  _p_o_s_i_t_i_o_n  _o_n  _c_l_i_c_k  with
  4232. m_setevent  and  resetting  afterwards.  You can use 5 mouse
  4233. buttons,  pressing  and  releasing  the  button   are   dis-
  4234. tinguished.    The   buttons   are  named  Button1..Button5,
  4235. Button1Down..Button5Down in the bindinglist  (MGR  does  not
  4236. support Button4 and Button5, Button1 is used for window con-
  4237. trol).  The mouse will only be activated, if the environment
  4238. variable TERM is set to mgr or mgr_x_x_x, _x_x_x any text.  See in
  4239. your local mgr manuals for more information about mouse map-
  4240. ping.   Use  ORIGAMITERM to control the loading of different
  4241. keytables for different terminals!
  4242.  
  4243.  
  4244.  
  4245.  
  4246. Origami 1.6.92             - 68 -               October 1993
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252. User Guide                 - 69 -            Mouse extension
  4253.  
  4254.  
  4255. _4._1._3.  _X _a_n_d _M_G_R _t_o_g_e_t_h_e_r
  4256.  
  4257. MGR and X support can be  used  together,  because  the  MGR
  4258. mouse support uses the escape sequence from the X mouse sup-
  4259. port to detect a mouse click.
  4260.  
  4261. Enable both supports by defining XTERM and MGR.
  4262.  
  4263. The commandline option -T works only, if Origami is used  in
  4264. a xterm.
  4265.  
  4266. _4._2.  _M_u_l_t_i_p_l_e _M_o_u_s_e _s_u_p_p_o_r_t_s
  4267.  
  4268. Different mouse extensions in Origami and keybind  (rc-file)
  4269. can be used together, if
  4270.      both use the same `escape sequence' to  mark  a  mouse-
  4271.      click
  4272. or
  4273.      Origami scans the mouse itself.
  4274. In these cases, the mapping of mouse buttons is  defined  by
  4275. Origami.  Otherwise the mouse will not work.
  4276.  
  4277. _4._3.  _U_s_i_n_g _t_h_e _m_o_u_s_e _i_n _O_C_L
  4278.  
  4279. All keytables,  not  named  like  a  mouse-support  use  the
  4280. default  mouse-support (xterm).  This can be changed with -M
  4281. _x_x_x.  If the mouse-support is not set to no-mouse, the  OCL-
  4282. tags  MOUSY  and  _x_x_x  are  set  and the mouse-variables are
  4283. defined.  Otherwise, only the buttons  are  mapped  to  com-
  4284. mands,  but the mouse-variables are not used and no MOUSY is
  4285. set!  The mouse can be used with
  4286.  
  4287. (mouse-buttons _C_O_M_M_A_N_D-_F_O_R-_1 _C_O_M_M_A_N_D-_F_O_R-_2 .. )
  4288.  
  4289. Pressing the mouse button _x (number _x in the above mentioned
  4290. namelists)  will  activate  _C_O_M_M_A_N_D-_F_O_R-_x,  which can be any
  4291. Origami command or OCL function.   If  one  of  the  buttons
  4292. should  not be used, bind no-operation to it.  Only the but-
  4293. ton numbers are stored in the rc-file.  The names  are  gen-
  4294. erated  by  Origami at runtime, depending on Origami and its
  4295. runtime environment.
  4296.  
  4297. If a mouse button is pressed, while  set-language  or  menu-
  4298. counter  is  active,  the  click  will not return the above.
  4299. Instead of the mapped command, a coding for the chosen  menu
  4300. item  will  be  send.   This  is  the first character of the
  4301. chosen item.  Clicks to invalid positions will be ignored.
  4302.  
  4303. If the chosen mouse-support is not no-mouse,  the  following
  4304. OCL  variables  are  defined  automatically and set on mouse
  4305. click before running the command:
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312. Origami 1.6.92             - 69 -               October 1993
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318. User Guide                 - 70 -            Mouse extension
  4319.  
  4320.  
  4321.  
  4322.  
  4323.      mouse-b
  4324.           number of pressed button
  4325.      mouse-outside
  4326.           code for type of position
  4327.  
  4328.           value   position
  4329.            -2     clicked on message-line
  4330.            -1     clicked on area
  4331.             0     clicked inside text
  4332.             1     clicked on fold-lines for edited file
  4333.             2     clicked outside text
  4334.  
  4335.      mouse-buffer-number
  4336.              number of buffer
  4337.           or
  4338.              number of used buffers, if clicked  on  message
  4339.           line or area
  4340.      mouse-x
  4341.           column number
  4342.           Inside text you can use goto to  reach  the  posi-
  4343.           tion.
  4344.      mouse-y
  4345.           line number of mouse position, if in text or area
  4346.           Inside text you can use goto-line to reach the po-
  4347.           sition.
  4348.      mouse-go-y
  4349.           contains the number of steps  up/down,  if  inside
  4350.           text
  4351.           Use next-line (or previous-line  if  negative)  to
  4352.           reach the position.
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375. Origami 1.6.92             - 70 -               October 1993
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381. User Guide                 - 71 -              Miscellaneous
  4382.  
  4383.  
  4384. _5.  _M_i_s_c_e_l_l_a_n_e_o_u_s
  4385.  
  4386. If a document is to be loaded for the first time you  should
  4387. verify  that  it  does  not  contain  strings which could be
  4388. misinterpreted as fold marks by Origami.  The following sim-
  4389. ple shell script looks for such strings.
  4390.  
  4391.         fgrep '{{{' <filename>
  4392.         fgrep '}}}' <filename>
  4393.         fgrep ':::' <filename>
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441. Origami 1.6.92             - 71 -               October 1993
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447. User Guide                 - 72 -     Copyright appointments
  4448.  
  4449.  
  4450. _6.  _C_o_p_y_r_i_g_h_t _a_p_p_o_i_n_t_m_e_n_t_s
  4451.  
  4452. This chapter was not included in  earlier  versions,  but  a
  4453. discussion  on USENET convinced me to write it.  Please read
  4454. it carefully.
  4455.  
  4456. Each part of this software can and must be copied free.   If
  4457. you  copy  binaries,  you  must not prevent people from also
  4458. copying sources.  You must not remove my name from this pro-
  4459. gram.  If you want to use parts of it for your own purposes,
  4460. point out what is your code and what is mine.  You use  this
  4461. software completely at your own risk.
  4462.  
  4463. No part of this software may be used for military  purposes.
  4464. No exceptions will be made to this clause.
  4465.  
  4466. If someone wants to use this software even in part for  com-
  4467. mercial  purposes,   a  written  non  exclusive  license  is
  4468. needed.
  4469.  
  4470. There are no long remarks in the other files of this package
  4471. about  copyright  because program code and comments about it
  4472. are two different things, but the above conditions are valid
  4473. for the whole package!
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.  
  4501.  
  4502.  
  4503.  
  4504.  
  4505.  
  4506.  
  4507. Origami 1.6.92             - 72 -               October 1993
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513. User Guide                 - 73 -           Acknowledgements
  4514.  
  4515.  
  4516. _7.  _A_c_k_n_o_w_l_e_d_g_e_m_e_n_t_s
  4517.  
  4518. Most of this manual was written by me, but the original  was
  4519. written  by  someone else, who did not leave his name in it.
  4520. The concept of the folding editor was originally implemented
  4521. as  part of the Transputer development system at INMOS Ltd.,
  4522. Bristol, UK.  The editor was a part of the TDS D700, and was
  4523. written in Occam.  It first ran on a 68000 based Sage/Stride
  4524. development system, and later was Transputer resident on the
  4525. PC development system.
  4526.  
  4527. Origami was rewritten from scratch in Turbo Pascal by Martin
  4528. Green  while at Ferranti Ltd, Cheadle Heath, Stockport, Eng-
  4529. land, and used the same key mappings and editor functions as
  4530. the TDS editor.
  4531.  
  4532. It was then converted from Turbo Pascal by p2c and ported by
  4533. Charlie  Lawrence,  while  at  Eastman  Kodak  Co.  He added
  4534. lex/yacc based  keyfiles,  and  did  the  considerable  work
  4535. needed to get it running in C.
  4536.  
  4537. I fixed some bugs in memory management and elsewhere, ported
  4538. it  to  MINIX and later to Linux, changed its user interface
  4539. to look more Emacs-like and added  new  features.   Wolfgang
  4540. Stumvoll (stumvoll@pool.informatik.rwth-aachen.de) wrote the
  4541. OCL code and the keybind compiler.  He also made beta  tests
  4542. of  all  my  new  versions by using them for his daily work,
  4543. which helped a lot to find existing and new bugs.  Last  but
  4544. not  least,  he wrote the OCL fill-paragraph, goto-matching-
  4545. fence and towers-of-hanoi functions.  Both of us made a gen-
  4546. eral code clean up, which was much overdue.
  4547.  
  4548. Michael Schwingen  (michaels@pool.informatik.rwth-aachen.de)
  4549. ported  Origami to Atari TOS and fixed a few minor bugs.  He
  4550. decided against his port being archived on  the  ftp  server
  4551. mentioned  below,  so only he knows about the available ver-
  4552. sion and where to get it.
  4553.  
  4554. Thomas Hadig  (hadig@pool.informatik.rwth-aachen.de)  ported
  4555. Origami  to  Amiga  DOS.  His port is available on the below
  4556. mentioned ftp server.  Usually, it is up to  date  with  the
  4557. current official release.
  4558.  
  4559. Robert   Blum   (blum@pool.informatik.rwth-aachen.de)   once
  4560. ported an early version back to MS/PC DOS.
  4561.  
  4562. Andrew Miller  (windy@pool.informatik.rwth-aachen.de)  spent
  4563. much  time proofreading the documentation and is still writ-
  4564. ing the vi Emulation.  He tested most new  versions  on  his
  4565. MINIX machine as well.
  4566.  
  4567. Stephen  R.   van   den   Berg   (berg@pool.informatik.rwth-
  4568. aachen.de)      provided      the      POSIX      compatible
  4569. `Better/BuGless/Berg Regular Expression' library (bregex).
  4570.  
  4571.  
  4572.  
  4573. Origami 1.6.92             - 73 -               October 1993
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579. User Guide                 - 74 -           Acknowledgements
  4580.  
  4581.  
  4582. There are too many other people in different nets all around
  4583. the  world,  who helped with small tips, bug reports etc. to
  4584. improve Origami.  Thanks to all of you.
  4585.  
  4586. I maintain the whole Origami source code, which means that I
  4587. will  answer  or  forward mail concerning Origami, decide if
  4588. and how extensions should be made, give advices  for  people
  4589. who  are  porting  it, post new UN*X versions and update the
  4590. documentation.  I put new releases of  Origami  on  the  ftp
  4591. archive     ftp.thp.uni-koeln.de     [134.95.64.1],     path
  4592. pub/linux/origami.  If you can not reach  that  server,  try
  4593. [134.95.80.1], path pub/thp/linux/origami.
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639. Origami 1.6.92             - 74 -               October 1993
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645. User Guide                 - 75 -                 Appendixes
  4646.  
  4647.  
  4648. _8.  _A_p_p_e_n_d_i_x_e_s
  4649.  
  4650. _8._1.  _R_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_s
  4651.  
  4652. This version of Origami supports regular  expression  search
  4653. and  replace.   Origamis  regular expressions widely conform
  4654. POSIX extended/basic regular expressions.
  4655.  
  4656. _8._1._1.  _R_e_g_u_l_a_r _s_e_a_r_c_h _e_x_p_r_e_s_s_i_o_n_s
  4657.  
  4658. Due to the internal text representation, it is impossible to
  4659. use regular expressions matching strings, containing newline
  4660. characters.
  4661.  
  4662. Origami does not support backreference expressions in  basic
  4663. regular search expressions.
  4664.  
  4665. The  following  is   a   table   of   known   operators   in
  4666. basic/extended  regular  expressions.   Refer  to your local
  4667. regular expression documentation for  more  details.   basic
  4668. (extended)    regular   subexpressions   are   marked   with
  4669. _B_R_e_g_E_x_p(_E_x_R_e_g_E_x_p).
  4670.  
  4671.                  basic             extended
  4672.  
  4673.                    _c                   _c
  4674.  
  4675.             Each character,  not  used  for  special
  4676.             purpose, matches itself.
  4677.  
  4678.  
  4679.                    .                   .
  4680.  
  4681.             Matches any single character.
  4682.  
  4683.  
  4684.                 [_c_l_a_s_s]             [_c_l_a_s_s]
  4685.                 [^_c_l_a_s_s]           [^_c_l_a_s_s]
  4686.  
  4687.             Matches a character [not] given  in  the
  4688.             brackets.  _c_l_a_s_s can be a list of:
  4689.               _c_h_a_r - a single character
  4690.               character   range   -   marked    with
  4691.             _c_h_a_r-_c_h_a_r
  4692.             or
  4693.               [:_s_e_t:] - _s_e_t=alpha, ..
  4694.                 _s_e_t is a predefined character set
  4695.                 user defined sets cannot be used
  4696.  
  4697.             The following expressions are  currently
  4698.             not support:
  4699.               Collating symbols [. .]
  4700.               Equivalence class expressions [= =]
  4701.  
  4702.  
  4703.                    ^                   ^
  4704.  
  4705.  
  4706.  
  4707.  
  4708. Origami 1.6.92             - 75 -               October 1993
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714. User Guide                 - 76 -                 Appendixes
  4715.  
  4716.  
  4717.  
  4718.             Matches the start of the line,  if  used
  4719.             at the start of an expression.
  4720.  
  4721.  
  4722.                    $                   $
  4723.  
  4724.             Matches the end of the line, if used  at
  4725.             the end of an expression.
  4726.  
  4727.  
  4728.             _B_R_e_g_E_x_p _B_R_e_g_E_x_p    _E_x_R_e_g_E_x_p _E_x_R_e_g_E_x_p
  4729.  
  4730.             Matches the  concatenation  of  strings,
  4731.             matching    the   first/second   regular
  4732.             expressions.
  4733.  
  4734.  
  4735.               \(_B_R_e_g_E_x_p\)         (_E_x_R_e_g_E_x_p)
  4736.  
  4737.             Group the enclosed  regular  expression,
  4738.             which  can  be  accessed  by  \_x  in the
  4739.             replace pattern.
  4740.  
  4741.  
  4742.             _B_R_e_g_E_x_p\|_B_R_e_g_E_x_p   _E_x_R_e_g_E_x_p|_E_x_R_e_g_E_x_p
  4743.  
  4744.             Matches a string, matching  one  of  the
  4745.             given regular expressions.
  4746.             N.B.: \| is an extension in basic  regu-
  4747.             lar expressions.
  4748.  
  4749.  
  4750.                _B_R_e_g_E_x_p\+           _E_x_R_e_g_E_x_p+
  4751.  
  4752.             Matches one or more  occurances  of  the
  4753.             given regular expression.
  4754.             N.B.: \+ is an extension in basic  regu-
  4755.             lar expressions.
  4756.  
  4757.  
  4758.                _B_R_e_g_E_x_p\?           _E_x_R_e_g_E_x_p?
  4759.  
  4760.             Matches zero or one  occurances  of  the
  4761.             given regular expression.
  4762.             N.B.: \? is an extension in basic  regu-
  4763.             lar expressions.
  4764.  
  4765.  
  4766.                 _B_R_e_g_E_x_p*           _E_x_R_e_g_E_x_p*
  4767.  
  4768.             Matches zero or more occurances  of  the
  4769.             given regular expression.
  4770.  
  4771.  
  4772.               _B_R_e_g_E_x_p\{_n\}        _E_x_R_e_g_E_x_p{_n}
  4773.              _B_R_e_g_E_x_p\{_n,_m\}      _E_x_R_e_g_E_x_p{_n,_m}
  4774.  
  4775.             Repeats the regular expression _n [to  _m]
  4776.             times.    _n[,_m]  have  to  be  decimals,
  4777.             0<=_n[<=_m].
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783. Origami 1.6.92             - 76 -               October 1993
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789. User Guide                 - 77 -                 Appendixes
  4790.  
  4791.  
  4792.                \!_B_R_e_g_E_x_p           !_E_x_R_e_g_E_x_p
  4793.  
  4794.             Match the next line, not containing  the
  4795.             following  regular  expression.  [\]! is
  4796.             only allowed at the beginning of a regu-
  4797.             lar expression.
  4798.             N.B.: [\]! is an extension in basic  and
  4799.             extended regular expressions.
  4800.  
  4801.  
  4802.  
  4803.  
  4804. _8._1._2.  _R_e_g_u_l_a_r _r_e_p_l_a_c_e _e_x_p_r_e_s_s_i_o_n_s
  4805.  
  4806. Inside regular expression search and  replace,  the  replace
  4807. pattern may contain the following subexpressions:
  4808.  
  4809.                      basic     extended
  4810.  
  4811.                    _c_h_a_r_a_c_t_e_r   _c_h_a_r_a_c_t_e_r
  4812.  
  4813.                    Each character,  not  used  for  special
  4814.                    purpose.
  4815.  
  4816.  
  4817.                       \_N          \_N
  4818.  
  4819.                    Is the text, matched by the _N-th group.
  4820.                    This can only be used,  if  there  is  a
  4821.                    corresponding  (..)  pair  in the search
  4822.                    expression!
  4823.                    _N is [g_d_i_g_i_t]*_d_i_g_i_t (g is used, to  mark
  4824.                    numbers >9!).
  4825.  
  4826.  
  4827.                       \u_N         \u_N
  4828.  
  4829.                    Is the text, matched by the  _N-th  group
  4830.                    with   lowercase  letters  converted  to
  4831.                    uppercase.
  4832.                    This can only be used,  if  there  is  a
  4833.                    corresponding  (..)  pair  in the search
  4834.                    expression!
  4835.                    _N is [g_d_i_g_i_t]*_d_i_g_i_t (g is used, to  mark
  4836.                    numbers >9!).
  4837.  
  4838.  
  4839.                       \l_N         \l_N
  4840.  
  4841.                    Is the text, matched by the  _N-th  group
  4842.                    with   uppercase  letters  converted  to
  4843.                    lowercase.
  4844.                    This can only be used,  if  there  is  a
  4845.                    corresponding  (..)  pair  in the search
  4846.                    expression!
  4847.                    _N is [g_d_i_g_i_t]*_d_i_g_i_t (g is used, to  mark
  4848.                    numbers >9!).
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854. Origami 1.6.92             - 77 -               October 1993
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860. User Guide                 - 78 -                 Appendixes
  4861.  
  4862.  
  4863.                    \{_N_e_x_p_r}    \{_N_e_x_p_r}
  4864.  
  4865.                    Use the first characters of _e_x_p_r, up  to
  4866.                    the  length  of  the  _N-th  group in the
  4867.                    search string.   If  _e_x_p_r  is  not  long
  4868.                    enough,   the  last  character  will  be
  4869.                    repeated up to the  needed  length.   If
  4870.                    _f_I_e_x_p_r  is  the empty string, space will
  4871.                    be used for padding.  \0 can be used  as
  4872.                    last  character in _e_x_p_r to suppress pad-
  4873.                    ding.
  4874.                    This can only be used,  if  there  is  a
  4875.                    corresponding  (..)  pair  in the search
  4876.                    expression!
  4877.                    _N is [g_d_i_g_i_t]*_d_i_g_i_t (g is used, to  mark
  4878.                    numbers >9!).
  4879.  
  4880.  
  4881.                    \?_N_e_x_p_r}    \?_N_e_x_p_r}
  4882.  
  4883.                    If the _n-th  group  matched,  add  _e_x_p_r,
  4884.                    otherwise the empty string.
  4885.                    _N is [g_d_i_g_i_t]*_d_i_g_i_t (g is used, to  mark
  4886.                    numbers >9!).
  4887.  
  4888.  
  4889.                    \!_N_e_x_p_r}    \!_N_e_x_p_r}
  4890.  
  4891.                    If the _n-th group  did  not  match,  add
  4892.                    _e_x_p_r, otherwise the empty string.
  4893.                    _N is [g_d_i_g_i_t]*_d_i_g_i_t (g is used, to  mark
  4894.                    numbers >9!).
  4895.  
  4896.  
  4897.                       \}          \}
  4898.  
  4899.                    Use inside of  complex  replace  expres-
  4900.                    sions to generate a single }.
  4901.  
  4902.  
  4903.                       \\          \\
  4904.  
  4905.                    Represent \.
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925. Origami 1.6.92             - 78 -               October 1993
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931. User Guide                 - 79 -                 Appendixes
  4932.  
  4933.  
  4934. _8._2.  _M_e_s_s_a_g_e_s
  4935.  
  4936. The following is the  list  of  all  messages,  Origami  can
  4937. display and which can be used in OCL-commands using the Ori-
  4938. gami messages. They are stored in the file  .origamimsg  and
  4939. can  be changed by editing this file. If you are doing this,
  4940. do not change the length of the lines, the type and order of
  4941. the used formats.
  4942.  
  4943. Different messages are used in  different  ways.  The  first
  4944. character of the message-name indicates the usage:
  4945.  
  4946.      D   display-characters:
  4947.          specifying some display-details
  4948.      F   format strings:
  4949.          should only used with last-message
  4950.      I   prompt strings:
  4951.          first character is used for yes,..
  4952.      M   strings to be displayed
  4953.  
  4954.  
  4955. If F__x_x_x messages are used inside OCL-prompts, string  argu-
  4956. ments  are  replaced by empty strings, integer and character
  4957. arguments are replaced by undefined numbers/characters.
  4958.  
  4959. The known messages are:
  4960.  
  4961. D_COMMA              limiter for modes in statusline
  4962. D_EOLN               marker for long lines
  4963. D_SOLN               mark for shifted lines
  4964. F_ADD_PATH           warning about extended enter-fold filename
  4965. F_DEMAND             error on demand load
  4966. F_F_FAILED           opening a filed fold failed
  4967. F_INFO_1             first format for describe-fold
  4968. F_INFO_2             second format for describe-fold
  4969. F_INT_OCL            internal OCL-crash
  4970. F_LOADING            displayed while loading a file
  4971. F_NO_DEFINE          save-keyboard-macro impossible adress
  4972. F_NO_OPEN            trying to open a non-text fold
  4973. F_NO_TERMCAP         cannot open terminal
  4974. F_SIZE_FILE          read/wrote lines/characters
  4975. F_SUBSTITUTIONS      number of replaces by replace-string
  4976. F_TCFF               toggle-file-fold overwrite a file?
  4977. F_TCG_F              keyboard problems (tcgetattr)
  4978. F_TCS_F              keyboard problems (tcsetattr)
  4979. F_TERMA              keyboard problems (missing capability)
  4980. F_TERMB              keyboard problems (not in termcap)
  4981. F_VM_FAIL            virtual text handling crashed
  4982. F_WRITING            displayed while writing a file
  4983. I_YES                yes-key
  4984. I_NO                 no-key
  4985. M_DSP                menu for command set-display-mode
  4986. I_QUIT               Quit
  4987. I_8BIT               8-Bit
  4988.  
  4989.  
  4990.  
  4991. Origami 1.6.92             - 79 -               October 1993
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997. User Guide                 - 80 -                 Appendixes
  4998.  
  4999.  
  5000. I_OCTAL              Octal
  5001. I_DECIMAL            Decimal
  5002. I_HEX                Hex
  5003. I_MARK               Mark
  5004. I_INVERS             Invers
  5005. I_NUMBER             Number
  5006. I_TAB                Tab
  5007. I_PLAIN              Plain
  5008. I_ALL                All
  5009. M_ANY_Q              prompt for help/describe bindings
  5010. I_NEXT_PAGE           (next-page)
  5011. I_NEWLINE            newline(next-line)
  5012. I_BACK               Back
  5013. I_FILTER             Filter
  5014. I_SEARCH             Search
  5015. I_KILL               Kill
  5016. M_Q_R_PROMPT         prompt for query-replace-string
  5017. I_DO_REST            do-rest key for query-replace-string
  5018. I_AB                 abort key for query-replace-string
  5019. I_DO_AB              do-and-abort key for query-replace-string
  5020. M_ABORTED            displayed, if a macro was aborted
  5021. M_ACF_LINE           read ASCII-file, }}} lines missing line
  5022. M_ACF_MSG            read ASCII-file, }}} lines missing msg
  5023. M_ARG                arg: for repeat-argument-_x
  5024. M_AUTO_SAVED         files has been auto-saved
  5025. M_BOTTOM             no move behind of entered fold
  5026. M_BYE                Bye
  5027. M_CANTOPEN           complain about failed file-open
  5028. M_CANTWRITE          complain about failed file-write
  5029. M_CHANGED_LEAVE      prompt, if leave a changed file
  5030. M_CHANGED_SAVE       prompt, if save a changed file
  5031. M_CLOSE_FAILED       complain about a failed file-close
  5032. M_CO_END             set-language asks for end-comment
  5033. M_CO_START           set-language asks for start-comment
  5034. M_DIRTY_FOLD         ASCII reading crashed, handle as text
  5035. M_DIR_EDIT           warning, editing directory!
  5036. M_END                End
  5037. M_ERR_PO             trying to edit at invalid place
  5038. M_EXE_EXE            no execute-macro while define-macro
  5039. M_FAILED             failed
  5040. M_FAILED_TERMINAL    cannot open keyboard/terminal
  5041. M_FF_COPY            copy of filed folds copies links
  5042. M_FILENAME           prompt for a filename
  5043. M_FILEPO             prompt for number of next file
  5044. M_FIX_EXE            no save-keyboard-macro while define-macro
  5045. M_FI_FAILED          find failed
  5046. M_FOLDERR            cannot fold
  5047. M_FORKFAIL           fork failed
  5048. M_GOTO               prompt for a line-number
  5049. M_HF                 help-file
  5050. M_INDENT_CRASH       reading ASCII changed indentation
  5051. M_KBD_PIPE_FAILED    more than one keyboard-pipe
  5052. M_KEY_BUFF_FULL      keyboard macrobuffer is full
  5053. M_KILLING            report killing the help
  5054.  
  5055.  
  5056.  
  5057. Origami 1.6.92             - 80 -               October 1993
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063. User Guide                 - 81 -                 Appendixes
  5064.  
  5065.  
  5066. M_LEAVE_INMOS        really leave language Inmos?
  5067. M_LIST               listing-mode for write-file?
  5068. M_LONG_LINE          complain about long line
  5069. M_LONG_LINE_SPLIT    complain about splitted long line
  5070. M_MAIL_1             dump-mail, part 1
  5071. M_MAIL_2             dump-mail, part 2
  5072. M_MAIL_3             dump-mail, part 3
  5073. M_MAIL_S             dump-mail, subject
  5074. M_MARK_PATTERN       replace at invalid position
  5075. M_MULT_EDIT          warn file edited in several buffers
  5076. M_NEW_FILE           read a new file message
  5077. M_B_NO_MEMORY        no memory
  5078. M_NOFOLDKEY          key disabled during create fold
  5079. M_NOT_BOUND          key not bound
  5080. M_NOT_IF_TDS         Inmos: some commands not allowed
  5081. M_NO_AREA            incorrect area-address
  5082. M_NO_BACK_FOLDING    complain: cannot fold backwards
  5083. M_NO_BUFFERS         no more buffers available
  5084. M_NO_CHANGE          save-file not done, file unchanged!
  5085. M_NO_ENTER_LIST_FF   cannot enter listing of filed fold
  5086. M_NO_FF_COPY         no copy of filed folds
  5087. M_NO_JOB             Origami cannot handle job-control
  5088. M_NO_KTAB            rc-file corrupted
  5089. M_NO_OUTFILE         filter-buffer cannot open the pipe
  5090. M_NO_PICK            nothing for insert-folded-kill-buffer
  5091. M_NO_SAVE_CANCEL     if cancel changes after failed save?
  5092. M_NO_SIMPLE_FOLD     normal fold required
  5093. M_NO_TERM            environment variable TERM not set
  5094. M_NO_TEXT            only text filed-folds can be entered
  5095. M_NO_TOP             action needs to be on toplevel
  5096. M_NO_TOP_AUTO_SAVE   cannot auto-save, entered a fold!
  5097. M_NO_UNDEL           undo-delete-line has nothing to do
  5098. M_NULL_CRASH         ASCII read:   or no newline
  5099. M_READ               Read
  5100. M_READING            Reading...
  5101. M_REG_EXP            Prompt for correction of regexp
  5102. M_REG_PAT            error: not defined replace pattern
  5103. M_REPLACE            Prompt for replace-pattern
  5104. M_RF                 rc-file
  5105. M_SEARCH             prompt for search-pattern
  5106. M_SHELL_CREATED      sub-shell created
  5107. M_SH_COMMAND         prompt for a shell-command
  5108. M_STACK_OVER         complain about OCL-stack-crash
  5109. M_SUSPEND            suspended
  5110. M_TABSIZE            prompt for tab-size
  5111. M_TDS_CRASH          reading corrupted Inmos-file
  5112. M_TDS_LONG_LINE      complain about long Inmos-line
  5113. M_TOP                no move above entered fold
  5114. M_TRAIL_SPACE        trailing whitespace found
  5115. M_USE_EXIT           trying to close a entered fold
  5116. M_VIEW               view mode!
  5117. M_WHICH_FIX          prompt for a macro-buffer
  5118. M_WIN_CHANGED        window changed
  5119. M_WRITING            Writing...
  5120.  
  5121.  
  5122.  
  5123. Origami 1.6.92             - 81 -               October 1993
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129. User Guide                 - 82 -                 Appendixes
  5130.  
  5131.  
  5132. M_WRITTEN            Written
  5133. M_XY_LONG            long position for statusline
  5134. M_XYS_LONG           long position with shift for statusline
  5135. M_XY_SHORT           short position for statusline
  5136. M_XYS_SHORT          short position with shift for statusline
  5137. M_Y                  line position for complain
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189. Origami 1.6.92             - 82 -               October 1993
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195. User Guide                 - 83 -                 Appendixes
  5196.  
  5197.  
  5198. _8._3.  _O_C_L-_a_s_s_e_m_b_l_e_r
  5199.  
  5200.  
  5201. _8._3._1.  _S_y_n_t_a_x
  5202.  
  5203. There are commands with different kinds of  arguments.   The
  5204. following command-types are known:
  5205.  
  5206.  COM       without arguments
  5207.  COM_I     with variable/integer argument
  5208.  COM_C     with character argument
  5209.  COM_A     with address argument
  5210.  COM_II    with 2 variable/integer arguments
  5211.  COM_P     with message-string argument
  5212.  COM_IP    with variable/integer and message-string arguments
  5213.  COM_IIP   with 2 variable/integer and message-string arguments
  5214.  
  5215.  
  5216. OCL-assembler statements are (OCL-assembler programs are not
  5217. handled by the optimizer!):
  5218.  
  5219. ._l_a_b_e_l
  5220.      Each unused identifier can be used as a label.  No code
  5221.      will  be  generated,  but  _l_a_b_e_l  can be used for jump-
  5222.      commands.  The definition of a label has to  be  marked
  5223.      with a leading ..
  5224.  
  5225. Origami functions and macros
  5226.      All Origami functions  and  OCL-macros  with  length  1
  5227.      (deffuns or single command defmacs or init_funs).
  5228.  
  5229. eval ( _s_t_a_t_e_m_e_n_t ... )
  5230.      Compile the OCL program '_s_t_a_t_e_m_e_n_t ...'.  The assembler
  5231.      program  calls  it as subroutine.  The compiled list of
  5232.      OCL-statements might be optimized.
  5233.  
  5234. number
  5235.  
  5236. "_t_e_x_t
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255. Origami 1.6.92             - 83 -               October 1993
  5256.  
  5257.  
  5258.  
  5259.  
  5260.  
  5261. User Guide                 - 84 -                 Appendixes
  5262.  
  5263.  
  5264.  
  5265. _c_o_m_m_a_n_d [_a_r_g_u_m_e_n_t [_a_r_g_u_m_e_n_t [_a_r_g_u_m_e_n_t]]]
  5266.      _c_o_m_m_a_n_d is one of  the  OCL-assembler  statements,  ex-
  5267.      plained below.  _a_r_g_u_m_e_n_ts are (depending on commandtype
  5268.      of _s_t_a_t_e_m_e_n_t):
  5269.      integer argument:
  5270.           [+ _n_u_m_b_e_r] ... _v_a_r_i_a_b_l_e-_n_a_m_e
  5271.                The following variable names are hidden vari-
  5272.                ables,  used  by  keybind  to  code  the OCL-
  5273.                statements.  These variables can be used only
  5274.                in OCL-assembler code directly!
  5275.  
  5276.                (dummy_x),_x=0,1,...   term evaluation
  5277.                (arg_x),_x=0,1,...     argument passing
  5278.                (loc_x),_x=0,1,...     save arguments
  5279.                (repeat)             used for repeat
  5280.                (return)             return value for functions/macros
  5281.                (rel_op)             <,.. #arguments > 2
  5282.  
  5283.           [+ _n_u_m_b_e_r] ... _v_a_r-_a_d_d_r_e_s_s
  5284.                _v_a_r-_a_d_d_r_e_s_s is a non  negative  integer  con-
  5285.                stant.
  5286.           [+ _n_u_m_b_e_r] ... _m_e_s_s_a_g_e-_n_a_m_e
  5287.                The coding of _m_e_s_s_a_g_e-_n_a_m_e, which is  one  of
  5288.                the above listed messages, stored in .origam-
  5289.                imsg.
  5290.      character argument:
  5291.           _n_u_m_b_e_r, _n_u_m_b_e_r>=0
  5292.           "_c_h_a_r_a_c_t_e_r
  5293.      address argument:
  5294.           [+ _n_u_m_b_e_r] ... _l_a_b_e_l
  5295.                Use address _l_a_b_e_l with given offset as target
  5296.                address.
  5297.           [+ _n_u_m_b_e_r] ... _j_u_m_p-_o_f_f_s_e_t
  5298.                Use the sum of given values as relative  jump
  5299.                offset.
  5300.      message-string argument
  5301.           _m_e_s_s_a_g_e-_s_t_r_i_n_g uses the same syntax as  in  normal
  5302.           OCL-statements.   You  have  to  add a M_END_MACRO
  5303.           yourself, to mark the end of the message-string!
  5304.           For example:
  5305.           M_PROMPT 2 ( M_ABORTED counter x ) M_END_MACRO
  5306.  
  5307. _8._3._2.  _C_o_m_m_a_n_d_s
  5308.  
  5309. The permission tags, used in the following table mean:
  5310.  
  5311.  
  5312.  
  5313. Origami 1.6.92             - 84 -               October 1993
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319. User Guide                 - 85 -                 Appendixes
  5320.  
  5321.  
  5322.  
  5323. *
  5324.      Always allowed, handled in innermost OCL-automat.
  5325.  
  5326. -
  5327.      Allowed, if no view-mode, folding or other restrictions
  5328.      are active.
  5329.  
  5330. V
  5331.      Allowed during view.
  5332.  
  5333. P
  5334.      Allowed in prompts.
  5335.  
  5336. F
  5337.      Allowed during create fold.
  5338.  
  5339. f
  5340.      Not allow during create fold, but can  be  used,  while
  5341.      the extended highlighting is active.
  5342. The known assembler statements are:
  5343.  
  5344.  O_NOP                                       256   COM
  5345.   no operation                                     *
  5346.  M_BEGIN_OF_LINE                             257   COM
  5347.   at beginning of line?                            PFV
  5348.  M_BOT_OF_FOLD                               258   COM
  5349.   at bottom of entered fold?                       FV
  5350.  M_CHANGE_FOLD                               259   COM_II
  5351.   change fold type                                 f
  5352.  M_EDIT_HISTORY                              260   COM_IIP
  5353.   edit inside a history list                       FV
  5354.  M_END_OF_LINE                               261   COM
  5355.   behind end of line?                              PFV
  5356.  M_FINISH                                    262   COM_IP
  5357.   exit Origami return=var[arg] show prompt         PFV
  5358.  M_GOTO_MARK                                 263   COM_I
  5359.   goto-line-mark var[arg]                          fV
  5360.  M_GO_BUFFER                                 264   COM_II
  5361.   go to buffer var[arg]                            FV
  5362.  M_GO_COUNTER_X_POS                          265   COM_I
  5363.   go to position var[arg]                          FV
  5364.  M_LAYOUT                                    266   COM_I
  5365.   handle screen layout                             FV
  5366.  M_POS_TO_COUNTER                            267   COM_I
  5367.   var[arg]=x-position                              FV
  5368.  M_SHOW_HELP                                 268   COM_I
  5369.   show the help file                               FV
  5370.  
  5371.  
  5372.  
  5373. Origami 1.6.92             - 85 -               October 1993
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379. User Guide                 - 86 -                 Appendixes
  5380.  
  5381.  
  5382.  M_STORE_C                                   269   COM
  5383.   var[arg]=current char                            PFV
  5384.  M_TEST_CC                                   270   COM_I
  5385.   current char==var[arg]?                          PFV
  5386.  M_TEST_CHAR                                 271   COM_I
  5387.   current char==arg?                               PFV
  5388.  M_TEST_CHAR_HIGH                            272   COM_I
  5389.   current char>arg?                                PFV
  5390.  M_TEST_CHAR_LOW                             273   COM_I
  5391.   current char<arg?                                PFV
  5392.  M_TEST_CHAR_SET                             274   COM_I
  5393.   current char in set arg?                         PFV
  5394.  M_TEST_H_CC                                 275   COM_I
  5395.   current char>var[arg]?                           PFV
  5396.  M_TEST_L_CC                                 276   COM_I
  5397.   current char<var[arg]?                           PFV
  5398.  M_TEST_STR                                  277   COM_P
  5399.   test, if arg==text                               PFV
  5400.  M_TOP_OF_FOLD                               278   COM
  5401.   at top of fold?                                  FV
  5402.  M_WRITE_HELP                                279   COM_IIP
  5403.   write at position in area                        FV
  5404.  O_ATTACH_FILE                               280   COM
  5405.   toggle-attach-file-to-fold                       f
  5406.  O_AUTO_SAVE                                 281   COM
  5407.   do the auto-save                                 PfV
  5408.  O_A_AUTO_SAVE                               282   COM
  5409.   add-mode-autosave                                PfV
  5410.  O_A_B_REGEXP                                283   COM
  5411.   add-mode-basic-regular-expression                FV
  5412.  O_A_ECHO                                    284   COM
  5413.   add-mode-echo                                    PfV
  5414.  O_A_FULLSHIFT                               285   COM
  5415.   add-mode-full-shift                              Vf
  5416.  O_A_HASH                                    286   COM
  5417.   add-mode-hash-shift                              PF
  5418.  O_A_NOPARSE                                 287   COM
  5419.   add-mode-no-parse                                PfV
  5420.  O_A_OVER                                    288   COM
  5421.   add-mode-overwrite                               PFV
  5422.  O_A_POSI                                    289   COM
  5423.   add-mode-position                                PfV
  5424.  O_A_TIME                                    290   COM
  5425.   add-mode-time                                    PfV
  5426.  
  5427.  
  5428. Origami 1.6.92             - 86 -               October 1993
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434. User Guide                 - 87 -                 Appendixes
  5435.  
  5436.  
  5437.  O_A_VERBOSE                                 291   COM
  5438.   add-mode-verbose                                 PFV
  5439.  O_A_VIEW                                    292   COM
  5440.   add-mode-view                                    PFV
  5441.  O_A_X_REGEXP                                293   COM
  5442.   add-mode-extended-regular-expression             FV
  5443.  O_BOT_OF_FOLD                               294   COM
  5444.   end-of-fold                                      FV
  5445.  O_BREAK                                     295   COM
  5446.   abort                                            PFV
  5447.  O_CHANGE_MARK                               296   COM
  5448.   change-fold-mark                                 f
  5449.  O_CLOSE_FOLD                                297   COM
  5450.   close-fold                                       fV
  5451.  O_COPY                                      298   COM
  5452.   double-line                                      f
  5453.  O_COPY_PICK                                 299   COM
  5454.   copy-to-kill-buffer                              fV
  5455.  O_CREATE_FOLD                               300   COM
  5456.   create-fold                                      F
  5457.  O_DELETE                                    301   COM
  5458.   delete-previous-character                        Pf
  5459.  O_DEL_LINE                                  302   COM
  5460.   delete-line                                      f
  5461.  O_DESCRIBE_BINDINGS                         303   COM
  5462.   describe-bindings                                FV
  5463.  O_DOWN                                      304   COM
  5464.   next-line                                        PFV
  5465.  O_DSP                                       305   COM
  5466.   set-display-mode                                 fV
  5467.  O_D_AUTO_SAVE                               306   COM
  5468.   delete-mode-autosave                             PfV
  5469.  O_D_ECHO                                    307   COM
  5470.   delete-mode-echo                                 PfV
  5471.  O_D_FULLSHIFT                               308   COM
  5472.   delete-mode-full-shift                           Vf
  5473.  O_D_HASH                                    309   COM
  5474.   delete-mode-hash-shift                           PF
  5475.  O_D_NOPARSE                                 310   COM
  5476.   delete-mode-no-parse                             PfV
  5477.  O_D_OVER                                    311   COM
  5478.   delete-mode-overwrite                            PFV
  5479.  O_D_POSI                                    312   COM
  5480.   delete-mode-position                             PfV
  5481.  
  5482.  
  5483. Origami 1.6.92             - 87 -               October 1993
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489. User Guide                 - 88 -                 Appendixes
  5490.  
  5491.  
  5492.  O_D_REGEXP                                  313   COM
  5493.   delete-mode-regular-expression                   FV
  5494.  O_D_TIME                                    314   COM
  5495.   delete-mode-time                                 PfV
  5496.  O_D_VERBOSE                                 315   COM
  5497.   delete-mode-verbose                              PFV
  5498.  O_D_VIEW                                    316   COM
  5499.   delete-mode-view                                 PFV
  5500.  O_END_OF_LINE                               317   COM
  5501.   end-of-line                                      PFV
  5502.  O_ENTER_FOLD                                318   COM
  5503.   enter-fold                                       V
  5504.  O_ENTER_NO_FILE                             319   COM
  5505.   enter-list-file                                  V
  5506.  O_EXIT_FOLD                                 320   COM
  5507.   exit-fold                                        V
  5508.  O_FILE_C                                    321   COM
  5509.   filename-completion                              PF
  5510.  O_FILE_FOLD                                 322   COM
  5511.   toggle-file-fold                                 f
  5512.  O_FILTER_BUFFER                             323   COM
  5513.   filter-buffer                                    -
  5514.  O_FILTER_LINE                               324   COM
  5515.   filter-line                                      -
  5516.  O_FIND                                      325   COM
  5517.   search-forward                                   PfV
  5518.  O_FIND_REVERSE                              326   COM
  5519.   search-reverse                                   PfV
  5520.  O_FINISH                                    327   COM
  5521.   save-and-exit-buffer                             PFV
  5522.  O_FIRST_LINE_TO_FOLD_H                      328   COM
  5523.   auto-header                                      f
  5524.  O_FLUSH                                     329   COM_I
  5525.   redraw-display                                   PFV
  5526.  O_FOLD_INFO                                 330   COM
  5527.   describe-fold                                    FV
  5528.  O_GOTO_LINE                                 331   COM
  5529.   goto-line                                        fV
  5530.  O_GROW_BUFFER                               332   COM
  5531.   grow-buffer                                      FV
  5532.  O_GROW_W_BUFFER                             333   COM
  5533.   widen-buffer                                     FV
  5534.  O_HELP                                      334   COM
  5535.   help                                             PFV
  5536.  
  5537.  
  5538. Origami 1.6.92             - 88 -               October 1993
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544. User Guide                 - 89 -                 Appendixes
  5545.  
  5546.  
  5547.  O_INSERT_FILE                               335   COM
  5548.   insert-file                                      f
  5549.  O_ITS_REVERSE                               336   COM
  5550.   incremental-search-reverse                       PfV
  5551.  O_ITS_SEARCH                                337   COM
  5552.   incremental-search-forward                       PfV
  5553.  O_LANGUAGE                                  338   COM
  5554.   set-language                                     f
  5555.  O_LEFT                                      339   COM
  5556.   backward-character                               PFV
  5557.  O_MOVE                                      340   COM
  5558.   move-line                                        f
  5559.  O_OPEN_BUFFER                               341   COM
  5560.   open-buffer                                      FV
  5561.  O_OPEN_FOLD                                 342   COM
  5562.   open-fold                                        fV
  5563.  O_OPEN_LIST_BUFFER                          343   COM
  5564.   open-list-buffer                                 FV
  5565.  O_OPEN_LIST_FILE                            344   COM
  5566.   read-list-file                                   V
  5567.  O_OPEN_LIST_W_BUFFER                        345   COM
  5568.   open-list-adjacent-buffer                        FV
  5569.  O_OPEN_NEW_FILE                             346   COM
  5570.   read-file                                        V
  5571.  O_OPEN_W_BUFFER                             347   COM
  5572.   open-adjacent-buffer                             FV
  5573.  O_PAGE_DOWN                                 348   COM
  5574.   next-page                                        PFV
  5575.  O_PAGE_UP                                   349   COM
  5576.   previous-page                                    PFV
  5577.  O_PICK                                      350   COM
  5578.   kill-line                                        f
  5579.  O_PIPE_FROM_COMMAND                         351   COM
  5580.   pipe-from-command                                f
  5581.  O_PIPE_TO_COMMAND                           352   COM
  5582.   pipe-to-command                                  fV
  5583.  O_PROMPT                                    353   COM
  5584.   refresh-line                                     FV
  5585.  O_PUT_PICK                                  354   COM
  5586.   insert-folded-kill-buffer                        f
  5587.  O_QUERY_REPLACE                             355   COM
  5588.   query-replace-string                             -
  5589.  O_QUIT                                      356   COM
  5590.   exit-buffer                                      PFV
  5591.  
  5592.  
  5593. Origami 1.6.92             - 89 -               October 1993
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599. User Guide                 - 90 -                 Appendixes
  5600.  
  5601.  
  5602.  O_REFRESH                                   357   COM
  5603.   center-and-redraw-display                        PFV
  5604.  O_REMOVE_FOLD                               358   COM
  5605.   unfold-fold                                      f
  5606.  O_RENAME_FILE                               359   COM
  5607.   change-buffername                                fV
  5608.  O_REPLACE                                   360   COM
  5609.   replace-string                                   -
  5610.  O_RETURN                                    361   COM
  5611.   newline-and-indent                               Pf
  5612.  O_RIGHT                                     362   COM
  5613.   forward-character                                PFV
  5614.  O_SAVE_FILE                                 363   COM
  5615.   save-file                                        fV
  5616.  O_SHELL                                     364   COM
  5617.   shell                                            fV
  5618.  O_SHELL_COMMAND                             365   COM
  5619.   shell-command                                    fV
  5620.  O_SHRINK_BUFFER                             366   COM
  5621.   shrink-buffer                                    FV
  5622.  O_SHRINK_W_BUFFER                           367   COM
  5623.   narrow-buffer                                    FV
  5624.  O_START_OF_LINE                             368   COM
  5625.   beginning-of-line                                PFV
  5626.  O_SUSPEND                                   369   COM
  5627.   suspend-origami                                  fV
  5628.  O_TITLE_HIDE                                370   COM
  5629.   status-line-off                                  fV
  5630.  O_TITLE_SHOW                                371   COM
  5631.   status-line-on                                   fV
  5632.  O_TOGGLE_CASE                               372   COM
  5633.   case-character-toggle                            PF
  5634.  O_TOP_OF_FOLD                               373   COM
  5635.   beginning-of-fold                                FV
  5636.  O_UNDEL_LINE                                374   COM
  5637.   undo-delete-line                                 Pf
  5638.  O_UP                                        375   COM
  5639.   previous-line                                    PFV
  5640.  O_WRITE_FILE                                376   COM
  5641.   write-file                                       fV
  5642.  K_MOUSE                                     377   COM
  5643.   mouse sending to stdin                           *
  5644.  K_QUOTE                                     378   COM
  5645.   quote-character                                  *
  5646.  
  5647.  
  5648. Origami 1.6.92             - 90 -               October 1993
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654. User Guide                 - 91 -                 Appendixes
  5655.  
  5656.  
  5657.  M_ADD_COUNTER_M_x                  395-_x,0<_x<=16   COM_I
  5658.   var[arg1]+= -_x                                   *
  5659.  M_ADD_COUNTER__x                  395+_x,0<=_x<=16   COM_I
  5660.   var[arg1]+= _x                                    *
  5661.  M_ADD_COUNTER                               412   COM_II
  5662.   var[arg1]+=arg1                                  *
  5663.  M_ASCII                                     413   COM_I
  5664.   var[arg] as command                              *
  5665.  M_BEGIN_FOLD_COMMENT                        414   COM
  5666.   at begin-fold-line?                              *
  5667.  M_CALL_M_x                         431-_x,0<_x<=16   COM
  5668.   push return-adress and call relativ -_x           *
  5669.  M_CALL__x                         431+_x,0<=_x<=16   COM
  5670.   push return-adress and call relativ _x            *
  5671.  M_CALL                                      448   COM_A
  5672.   push return-adress and call relativ +arg         *
  5673.  M_CHANGED                                   449   COM
  5674.   file changed?                                    *
  5675.  M_CLOSED_FOLD                               450   COM
  5676.   on closed-fold-line?                             *
  5677.  M_DIV                                       451   COM_II
  5678.   var[arg1]/=var[arg2]                             *
  5679.  M_ECHO_I                                    452   COM_I
  5680.   send var[arg] to terminal                        *
  5681.  M_ECHO_P                                    453   COM_P
  5682.   send prompt-text to terminal                     *
  5683.  M_EDITING                                   454   COM
  5684.   in prompt?                                       *
  5685.  M_END_FOLD_COMMENT                          455   COM
  5686.   an end-fold-line?                                *
  5687.  M_END_MACRO                                 456   COM
  5688.   end macro, pop return-adress                     *
  5689.  M_ENTERED                                   457   COM_I
  5690.   var[arg]=#entered folds                          *
  5691.  M_ENV_CMD                                   458   COM_IP
  5692.   environment handling command                     *
  5693.  M_EXIT                                      459   COM_P
  5694.   end macro and show message                       *
  5695.  M_FILED_FOLD                                460   COM
  5696.   on filed-fold-line?                              *
  5697.  M_FILETYP                                   461   COM_I
  5698.   var[arg]=code for filetype                       *
  5699.  M_FOLD_DATA                                 462   COM_II
  5700.   fold-comment-_x_x_x                                 *
  5701.  M_GET_BUFFER                                463   COM_II
  5702.  
  5703.  
  5704.  
  5705. Origami 1.6.92             - 91 -               October 1993
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711. User Guide                 - 92 -                 Appendixes
  5712.  
  5713.  
  5714.   screen-position -> buffer-id                     *
  5715.  M_GET_HISTORY                               464   COM_II
  5716.   get-history                                      *
  5717.  M_HISTORY                                   465   COM_I
  5718.   change active history                            *
  5719.  M_INT_STRING                                466   COM_I
  5720.   var[arg] as string                               *
  5721.  M_INV_COUNTER                               467   COM_I
  5722.   var[arg]*= -1                                    *
  5723.  M_JMP_M_x                          484-_x,0<_x<=16   COM
  5724.   jump relativ -_x                                  *
  5725.  M_JMP__x                          484+_x,0<=_x<=16   COM
  5726.   jump relativ _x                                   *
  5727.  M_JMP                                       501   COM_A
  5728.   jump relativ +arg                                *
  5729.  M_JMP_FALSE_M_x                    518-_x,0<_x<=16   COM
  5730.   if tag is false, jump relativ -_x                 *
  5731.  M_JMP_FALSE__x                    518+_x,0<=_x<=16   COM
  5732.   if tag is false, jump relativ _x                  *
  5733.  M_JMP_FALSE                                 535   COM_A
  5734.   if tag is false, jump relativ +arg               *
  5735.  M_JMP_TRUE_M_x                     552-_x,0<_x<=16   COM
  5736.   if tag is true, jump relativ -_x                  *
  5737.  M_JMP_TRUE__x                     552+_x,0<=_x<=16   COM
  5738.   if tag is true, jump relativ _x                   *
  5739.  M_JMP_TRUE                                  569   COM_A
  5740.   if tag is true, jump relativ +arg                *
  5741.  M_LANGUAGE                                  570   COM_A
  5742.   language==arg? +arg                              *
  5743.  M_LASTMES                                   571   COM_I
  5744.   last message==arg?                               *
  5745.  M_LOAD_MAC                                  572   COM_II
  5746.   load function arg                                *
  5747.  M_MENU                                      573   COM_IP
  5748.   menu for var[arg],prompt                         *
  5749.  M_MOD                                       574   COM_II
  5750.   var[arg1]%=var[arg2]                             *
  5751.  M_MULT                                      575   COM_II
  5752.   var[arg1]*=var[arg2]                             *
  5753.  M_NOT                                       576   COM
  5754.   tag=!tag                                         *
  5755.  M_NULL_COUNTER                              577   COM_I
  5756.   var[arg]==0?                                     *
  5757.  M_POP_DELBUF                                578   COM
  5758.   pop-delete-buffer                                *
  5759.  M_POP_INT                                   579   COM_I
  5760.  
  5761.  
  5762. Origami 1.6.92             - 92 -               October 1993
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768. User Guide                 - 93 -                 Appendixes
  5769.  
  5770.  
  5771.   get var[arg] from stack                          *
  5772.  M_POP_INT_X                                 580   COM_II
  5773.   get var[arg1+var[arg2]] from stack               *
  5774.  M_POSITIV_COUNTER                           581   COM_I
  5775.   var[arg]>0?                                      *
  5776.  M_PROMPT                                    582   COM_IP
  5777.   prompt for var[arg]-value                        *
  5778.  M_PROMPT_C                                  583   COM_IP
  5779.   prompt for var[arg]-char                         *
  5780.  M_PUSH_INT                                  584   COM_I
  5781.   push var[arg] on stack                           *
  5782.  M_PUSH_INT_X                                585   COM_II
  5783.   push var[arg1+var[arg2]] on stack                *
  5784.  M_READ_REPEAT                               586   COM_I
  5785.   reset repeat-mode                                *
  5786.  M_RESET_USER_MODE                           587   COM_I
  5787.   no user-mode arg                                 *
  5788.  M_SCREEN_OFF                                588   COM
  5789.   don't write on screen                            *
  5790.  M_SCREEN_ON                                 589   COM
  5791.   write on screen                                  *
  5792.  M_SET_COPY                                  590   COM_II
  5793.   copy set2 to set1                                *
  5794.  M_SET_COUNTER_M_x                  607-_x,0<_x<=16   COM_I
  5795.   var[arg1]= -_x                                    *
  5796.  M_SET_COUNTER__x                  607+_x,0<=_x<=16   COM_I
  5797.   var[arg1]= _x                                     *
  5798.  M_SET_COUNTER                               624   COM_II
  5799.   var[arg1]=arg1                                   *
  5800.  M_SET_USER_MODE                             625   COM_I
  5801.   user-mode arg                                    *
  5802.  M_SET_USER_MODE_NUMB                        626   COM_II
  5803.   user-number-mode arg arg                         *
  5804.  M_SHOW_CURSOR                               627   COM_I
  5805.   show cursor var[arg]/10 sec                      *
  5806.  M_STORE_LINE_NO                             628   COM_I
  5807.   var[arg]=line-number                             *
  5808.  M_STORE_MARK                                629   COM_I
  5809.   var[arg]=line-mark                               *
  5810.  M_SUM_COUNTER                               630   COM_II
  5811.   var[arg1]+=var[arg2]                             *
  5812.  M_SW_KBD                                    631   COM_I
  5813.   switch to keyboard arg                           *
  5814.  M_S_ENTERED                                 632   COM_I
  5815.  
  5816.  
  5817.  
  5818. Origami 1.6.92             - 93 -               October 1993
  5819.  
  5820.  
  5821.  
  5822.  
  5823.  
  5824. User Guide                 - 94 -                 Appendixes
  5825.  
  5826.  
  5827.   var[arg]= #entered spaces                        *
  5828.  M_TEST_AUTO                                 633   COM
  5829.   in auto-save-mode?                               *
  5830.  M_TEST_ECHO                                 634   COM
  5831.   in echo-mode?                                    *
  5832.  M_TEST_FOLD                                 635   COM
  5833.   creating a fold?                                 *
  5834.  M_TEST_HASH                                 636   COM
  5835.   test-hash-shift                                  *
  5836.  M_TEST_OVER                                 637   COM
  5837.   in overwrite-mode?                               *
  5838.  M_TEST_VERBOSE                              638   COM
  5839.   test, if verbose is active                       *
  5840.  M_TEST_VIEW                                 639   COM
  5841.   in view-mode?                                    *
  5842.  M_TEXTLINE                                  640   COM
  5843.   normal textline?                                 *
  5844.  O_BELL                                      641   COM
  5845.   bell                                             *
  5846.  O_BELL_VISIBLE                              642   COM
  5847.   visible-bell                                     *
  5848.  O_DEF_FIX                                   643   COM
  5849.   save-keyboard-macro                              *
  5850.  O_DEF_MACRO                                 644   COM
  5851.   define-macro                                     *
  5852.  O_REP_0                                     645   COM
  5853.   set-argument-0                                   *
  5854.  O_REP_1                                     646   COM
  5855.   set-argument-1                                   *
  5856.  O_REP_2                                     647   COM
  5857.   set-argument-2                                   *
  5858.  O_REP_3                                     648   COM
  5859.   set-argument-3                                   *
  5860.  O_REP_4                                     649   COM
  5861.   set-argument-4                                   *
  5862.  O_REP_5                                     650   COM
  5863.   set-argument-5                                   *
  5864.  O_REP_6                                     651   COM
  5865.   set-argument-6                                   *
  5866.  O_REP_7                                     652   COM
  5867.   set-argument-7                                   *
  5868.  O_REP_8                                     653   COM
  5869.   set-argument-8                                   *
  5870.  
  5871.  
  5872. Origami 1.6.92             - 94 -               October 1993
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878. User Guide                 - 95 -                 Appendixes
  5879.  
  5880.  
  5881.  O_REP_9                                     654   COM
  5882.   set-argument-9                                   *
  5883.  O_UNCHANGE                                  655   COM
  5884.   set-file-unchanged                               *
  5885.  O_UNDEL_CHAR                                656   COM
  5886.   undo-delete-character                            *
  5887.  O_CALL_FIX                                  657   COM
  5888.   dummy, used during compilation                   *
  5889.  O_EXE_MACRO                                 658   COM
  5890.   execute-macro                                    *
  5891.  O_CALL_FIX _x                         _x+658,_x>=0   COM
  5892.   call the OCL-macro _x                             *
  5893.  
  5894.  
  5895. Tokens lower than 256 represent  the  corresponding  charac-
  5896. ters.
  5897.  
  5898.  
  5899.  
  5900.  
  5901.  
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934. Origami 1.6.92             - 95 -               October 1993
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940. User Guide                 - 96 -                 Appendixes
  5941.  
  5942.  
  5943. _8._4.  _C_o_m_m_a_n_d _l_i_n_e _o_p_t_i_o_n_s
  5944.  
  5945. The following is part of the online help.  Origamis usage is
  5946.  
  5947.         origami [_o_p_t_i_o_n ...] [_f_i_l_e ...]
  5948.  
  5949. where _o_p_t_i_o_n_s can be:
  5950.  
  5951. -a _d_e_l_a_y, 1<=_d_e_l_a_y<=60
  5952.      Origami will start in auto-save-mode with _d_e_l_a_y minutes
  5953.      (-a 0, no auto-save).  Multiple usage of this option is
  5954.      allowed.  The last given value is used.  Default  value
  5955.      is 8.
  5956. -d _d_i_s_p_l_a_y-_m_o_d_e
  5957.      Specify the character display mode. _f_I_d_i_s_p_l_a_y-_m_o_d_e is a
  5958.      list of code (like in set-display-mode).
  5959.      o - octal display
  5960.      d - decimal display
  5961.      h - hexadecimal display
  5962.      m - mark control characters
  5963.      i - invers control characters
  5964.      n - numbered control characters
  5965.      p - normal character display
  5966.      8 - numbered display of 8-bit characters
  5967.      a - numbered display of all characters
  5968.      t_n_u_m_b_e_r - tab width is set to _n_u_m_b_e_r
  5969. -e
  5970.      Origami does  not  echo  the  entered  keys  under  the
  5971.      statusline.
  5972. -f _m_a_t_c_h
  5973.      Origami will pass '-f _m_a_t_c_h' to dirfold.  Can  be  used
  5974.      to  specify  the  files, which will be shown in diredit
  5975.      mode.
  5976. -h
  5977.      Origami prints its usage.
  5978. -i
  5979.      Like -di.
  5980. -k _n_a_m_e_b_a_s_e
  5981.      Origami reads the keybinding and the  bindinglist  from
  5982.      file  .origamirc, the help from .origamihelp.  This op-
  5983.      tion sets the files to _n_a_m_e_b_a_s_erc and _n_a_m_e_b_a_s_ehelp.  If
  5984.      Origami cannot find the files in the current directory,
  5985.      Origami tries to find  the  files  in  the  directories
  5986.      $HOME  or  ORIGAMI_PATH  (set at compiletime).  Origami
  5987.      searches only in the resource path, if the given  argu-
  5988.      ment  _n_a_m_e_b_a_s_e is not an absolute path.  This option is
  5989.      not allowed, if -O has been used before!
  5990. -l _l_i_n_e
  5991.      Goto _l_i_n_e after setting up.  Multiple usage  of  -l  ..
  5992.      is not allowed.
  5993.  
  5994.  
  5995. Origami 1.6.92             - 96 -               October 1993
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001. User Guide                 - 97 -                 Appendixes
  6002.  
  6003.  
  6004. -m _m_a_r_k_n_a_m_e
  6005.      Origami searches in the rcfile for a set  of  foldmarks
  6006.      named  _m_a_r_k_n_a_m_e.   If  there  is no such markset given,
  6007.      Origami will stop.  Otherwise the marks for  folds  are
  6008.      switched  to  the new ones.  Multiple usage of -m .. is
  6009.      not allowed.
  6010. -n
  6011.      Every time a file is read this will take place  without
  6012.      the  {{{, }}} or ::: sequences being parsed.  Folds can
  6013.      be used when editing, but there is no folding-structure
  6014.      in  the  read  file.   This allows the editing of files
  6015.      which contain these strings without confusing  Origami.
  6016.      The  Inmos format will not be decoded if this option is
  6017.      active.  This `non-folding' mode concerns only  reading
  6018.      files.   Creating  new  folds  or  writing  files using
  6019.      language Inmos is possible.
  6020. -o
  6021.      Origami starts in overwrite-mode.
  6022. -p
  6023.      Preprocessormode is on.  Leading hashes  are  moved  to
  6024.      first  character  in  lines.   Reading such files moves
  6025.      hashes to indentation of surrounding folds.
  6026. -t _t_a_b-_w_i_d_t_h
  6027.      Like -dt<_t_a_b-_w_i_d_t_h>.
  6028. -v
  6029.      Origami starts in view-mode.
  6030. -A
  6031.      Origami starts not with the first file in command line,
  6032.      but  with  the list of given files.  This option is ig-
  6033.      nored, if there are not more than 1 command  line  file
  6034.      or if Origami is started within a pipe.
  6035. -C
  6036.      Do not display the copyright message at startup.
  6037. -D
  6038.      Dump core on crash.
  6039. -F _n_o_m_a_t_c_h
  6040.      Origami will pass '-F _n_o_m_a_t_c_h' to dirfold.  Can be used
  6041.      to  specify  the  files,  which  will  not  be shown in
  6042.      diredit mode.
  6043. -K_A,-K_N
  6044.      Origami changes the mode of the keypad  to  application
  6045.      (_A)  or  numerical (_N) mode at startup, if the terminal
  6046.      supports this.  Default is application (_A).
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054. Origami 1.6.92             - 97 -               October 1993
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060. User Guide                 - 98 -                 Appendixes
  6061.  
  6062.  
  6063. -M_m_a_r_k_s
  6064.      Folder replaces the foldmarks by the  characters  given
  6065.      with _m_a_r_k_s.  aaabbbcccddd is evaluated:
  6066.      aaa for start of fold
  6067.      bbb for filed fold name
  6068.      ccc for closed fold
  6069.      ddd for end of fold
  6070.      None of these strings may start with a space or a tab!
  6071. -N _n_u_m_b_e_r
  6072.      If Origami is compiled with support for  storing  lines
  6073.      on  backing store, this options sets the number of buf-
  6074.      fered lines.
  6075. -O _o_c_l-_v_a_l_u_e
  6076.      Change the value of OCL integer  variable  ocl-argument
  6077.      to _o_c_l-_v_a_l_u_e.  If the current bindings supports it, you
  6078.      can use literals.  origami [-k_b_i_n_d_i_n_g] -h will show all
  6079.      known  literals.   See  in the User Manual for more ad-
  6080.      vanced options.  Multiple usage of this option  is  al-
  6081.      lowed.  If this option is not used, ocl-argument is in-
  6082.      itialized with -1.
  6083. -P
  6084.      Don't open the controlling terminal,  if  called  in  a
  6085.      pipe.
  6086. -R _r_c-_p_a_t_h
  6087.      Specify the path list for origami resource files.
  6088. -S _s_h_e_l_l
  6089.      Secure mode is activated.
  6090.      Pipe-commands  are  disabled  and  shell-commands   use
  6091.      _s_h_e_l_l.   If _s_h_e_l_l is the empty word, shell-commands are
  6092.      also disabled.  If -S_s_h_e_l_l  is  used,  the  only  pipe,
  6093.      called  by  Origami,  is  'dirfold  ...', to handle the
  6094.      editing of directories.
  6095. -T _d_e_f_a_u_l_t-_n_a_m_e
  6096.      This option is only available, if Origami  is  compiled
  6097.      to  support  xterms.  In this case, this option enables
  6098.      Origami to set the xterm window name to the name of the
  6099.      current  file.   After Origami has finished, the window
  6100.      name is changed to  _d_e_f_a_u_l_t-_n_a_m_e.   Multiple  usage  of
  6101.      this  option is allowed.  The last given value is used.
  6102.      If the given value is the empty string, xterm is used.
  6103. -X _o_s _s_p_e_c_i_f_i_c _o_p_t_i_o_n
  6104.      Some special versions of Origami  use  this  option  to
  6105.      handle  additional features.  See the OS-specific docu-
  6106.      ments for more information.
  6107. -V
  6108.      Origami starts in verbose-mode.
  6109.  
  6110.  
  6111.  
  6112.  
  6113.  
  6114. Origami 1.6.92             - 98 -               October 1993
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120. User Guide                 - 99 -                 Appendixes
  6121.  
  6122.  
  6123. -W _w_i_n_d_o_w _n_a_m_e
  6124.      _w_i_n_d_o_w _n_a_m_e will be displayed  in  the  statusline,  in
  6125.      front  of the filename. _w_i_n_d_o_w _n_a_m_e will also appear in
  6126.      the title of xterms, if -T is used.  This  is  intended
  6127.      for  users  of  Virtual  Terminal  environments such as
  6128.      Screen, where the Terminal Name can be stored in an en-
  6129.      vironment  variable.   This  means  one can distinguish
  6130.      between several sessions on several terminals.
  6131. -Z
  6132.      Origami cannot be stopped via suspend-origami.
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159.  
  6160.  
  6161.  
  6162.  
  6163.  
  6164.  
  6165.  
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179. Origami 1.6.92             - 99 -               October 1993
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185. User Guide                - 100 -                 Appendixes
  6186.  
  6187.  
  6188. _8._5.  _C_o_m_p_i_l_e_t_i_m_e _C_o_n_f_i_g_u_r_a_t_i_o_n
  6189. There are many parameters, which can be changed at  compile-
  6190. time.   More  details  about  changings  these constants are
  6191. given in the source of this distribution. A  short  list  of
  6192. the possible changes follows.
  6193. Warning: Changing these constants may  produce  incompatible
  6194. rc-files!
  6195. Languages
  6196.      The  predefined  languages  for  fold  hiding  can   be
  6197.      changed.
  6198. Constants
  6199.      Some  constants  describing  table  sizes  and   string
  6200.      length:
  6201.      linelength (1024)
  6202.      length of TDS lines (152)
  6203.      length of user comment strings (64)
  6204.      cut length for user comment strings in statusline(8)
  6205.      size of delete-buffer (64)
  6206.      length of keyboard macros (512)
  6207.      identifier length (128)
  6208.      length of binding names and command line aliases (16)
  6209.      length of mark names (9)
  6210.      length of keysequences (64)
  6211.      line length in help (256)
  6212.      OCL statement length (8192)
  6213.      OCL filed-fold stack depth (8)
  6214.      number of user modes (64)
  6215.      minimum auto-save time (1)
  6216.      maximum auto-save time (60)
  6217.      default auto-save time (8)
  6218.      history minimum size (8)
  6219.      history maximum size (128)
  6220.      number of command line aliases (128)
  6221.      dimension of ocl-arg-field (16)
  6222.      regular replace patterns (16)
  6223.  
  6224.  
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232. Origami 1.6.92            - 100 -               October 1993
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238. User Guide                - 101 -                 Appendixes
  6239.  
  6240.  
  6241. Environment variables
  6242.      The names for the environment variables:
  6243.      HOME
  6244.      TERM
  6245.      SHELL
  6246. Strings
  6247.      You can change the following strings:
  6248.      .origamimsg
  6249.           All formats, given in .origamimsg can  be  changed
  6250.           by changing the default file.
  6251.      default resource path
  6252.           the default value  for  the  environment  variable
  6253.           ORIGAMIPATH (.:~:/home/hadig/origami)
  6254.      default keybind library path
  6255.           the default value for environment variable KBDLIB-
  6256.           PATH
  6257.           (.:/home/hadig/origami/bindings/fun:/home/hadig/origami/bindings)
  6258.      View/V
  6259.      DirView/DV
  6260.      DefMac/D
  6261.      Folding/F
  6262.      Over/O
  6263.      AutoSave/S
  6264.      NoParse/NP
  6265.      #
  6266.      ...
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.  
  6280.  
  6281.  
  6282.  
  6283.  
  6284.  
  6285.  
  6286.  
  6287.  
  6288. Origami 1.6.92            - 101 -               October 1993
  6289.  
  6290.  
  6291.  
  6292.  
  6293.  
  6294. User Guide                - 102 -                 Appendixes
  6295.  
  6296.  
  6297. _9.  _I_n_d_e_x
  6298. There are 3 types of indices:
  6299.  
  6300.               line   marks a definition.
  6301.               _l_i_n_e   marks an example.
  6302.               line   marks a normal reference.
  6303.  
  6304.  
  6305.  
  6306.                                                    25 25
  6307.  
  6308.     !                                              75 77
  6309.  
  6310.     #                                                  5
  6311.  
  6312.     $                                        25 25 _2_5 75
  6313.     $esc                                              25
  6314.  
  6315.     (                                                 75
  6316.  
  6317.     )                                                 75
  6318.  
  6319.     *                                              25 75
  6320.  
  6321.     +                                              25 75
  6322.  
  6323.     &.                                                75
  6324.     &.origamihelp                              21 25 100
  6325.     &.origamimsg                            25 25 79 101
  6326.     &.origamirc                             20 21 25 100
  6327.  
  6328.     0x                                                25
  6329.  
  6330.     <                                                 25
  6331.     <=                                                25
  6332.     <>                                                25
  6333.  
  6334.     &=                                                25
  6335.  
  6336.     >                                                 25
  6337.     >=                                                25
  6338.  
  6339.     ?                                              75 77
  6340.  
  6341.     [                                                 75
  6342.  
  6343.     \                                              77 77
  6344.     \!                                                77
  6345.     \0                                                77
  6346.     \?                                                77
  6347.     \l                                                77
  6348.     \u                                                77
  6349.     \{                                                77
  6350.  
  6351.  
  6352.  
  6353. Origami 1.6.92            - 102 -               October 1993
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359. User Guide                - 103 -                      Index
  6360.  
  6361.  
  6362.     ]                                                 75
  6363.  
  6364.     ^                                                 75
  6365.  
  6366.     {                                              75 77
  6367.  
  6368.     |                                                 75
  6369.  
  6370.     }                                              75 77
  6371.  
  6372.     @:
  6373.     @                                                 25
  6374.     @error                                            25
  6375.     @fi                                         25 _6_1 _6_2
  6376.     @if-using                                   25 _6_1 _6_2
  6377.     @include                                       25 _6_2
  6378.     @lib                                           25 _6_2
  6379.     @line                                             25
  6380.     @rc-comment                                       25
  6381.     @reference-begin                                  25
  6382.     @reference-begin-class                         21 25
  6383.     @reference-end                                    25
  6384.     @use                                           25 _6_1
  6385.  
  6386.     A small function                                  25
  6387.     abort                                          25 25
  6388.     abort-macro                              25 25 _6_3 _6_4
  6389.     Acknowledgements                                  73
  6390.     add-mode-autosave                      24 25 100 101
  6391.     add-mode-basic-regular-expression                 23
  6392.     add-mode-echo                                   5 24
  6393.     add-mode-extended-regular-expression              23
  6394.     add-mode-full-shift                               22
  6395.     add-mode-hash-shift                               23
  6396.     add-mode-no-parse                             25 101
  6397.     add-mode-overwrite                            23 101
  6398.     add-mode-position                               5 22
  6399.     add-mode-time                                     24
  6400.     add-mode-verbose                                  24
  6401.     add-mode-view                                 23 101
  6402.     alias                                    25 25 _2_5 _6_3
  6403.                                                      100
  6404.     All Origami functions                              9
  6405.     and                                               25
  6406.     Appendixes                                        75
  6407.     area                                              25
  6408.     argument                                       19 25
  6409.     argument-list                                  25 25
  6410.     Arguments                                         19
  6411.     auto-header                                       11
  6412.     autoalias                                      25 _6_3
  6413.     AutoSave                                       5 101
  6414.     autosave-macro                              24 25 25
  6415.     autosave-mode                            5 24 25 100
  6416.  
  6417.  
  6418.  
  6419. Origami 1.6.92            - 103 -               October 1993
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425. User Guide                - 104 -                      Index
  6426.  
  6427.  
  6428.                                                      101
  6429.     Available implementations                         68
  6430.  
  6431.     backward-character                            6 9 14
  6432.     begin-prompt-macro                             25 25
  6433.     beginning-of-fold                                  9
  6434.     beginning-of-line                                6 9
  6435.     bell                                              25
  6436.     Binding commands to keys                          25
  6437.     Bindings keys                                     25
  6438.     Boolean expressions                               25
  6439.     boolean                                           25
  6440.     buffer                                    6 15 16 20
  6441.                                                       25
  6442.     buffer-from-position                              25
  6443.  
  6444.     C                                                7 _7
  6445.     C-                                             25 _2_5
  6446.     case                                              25
  6447.     case-character-toggle                           6 13
  6448.     center-and-redraw-display                      20 25
  6449.     change-buffer-macro                            25 25
  6450.     change-buffername                                 17
  6451.     change-fold-mark                                  25
  6452.     change-fold-type                                  25
  6453.     character set                                  25 75
  6454.     Character sets                                    25
  6455.     close-fold                                         9
  6456.     Command line options                    25 _6_4 96 100
  6457.     Command line options, hooks                       64
  6458.     Commands                                          84
  6459.     comment                                    7 _7 17 21
  6460.                                                   25 100
  6461.     Compiletime Configuration                        100
  6462.     Conditional compilation                     25 61 _6_1
  6463.     Contents                                           1
  6464.     Control structures                                25
  6465.     copy-to-kill-buffer                               13
  6466.     Copyright appointments                            72
  6467.     counter                                           25
  6468.     create-fold                               5 10 25 _6_4
  6469.                                                   85 101
  6470.     ctrl-char                                          4
  6471.     current-buffer-id                              25 25
  6472.     current-buffer-number                          25 25
  6473.     cursor-level                                      25
  6474.  
  6475.     D                                              5 101
  6476.     defassembler                                      25
  6477.     default                                        25 25
  6478.     defbinding                                 25 _6_4 100
  6479.     deffun                                      25 25 _2_5
  6480.     define-macro                              18 100 101
  6481.     defmac                                   5 25 _2_5 101
  6482.  
  6483.  
  6484.  
  6485. Origami 1.6.92            - 104 -               October 1993
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491. User Guide                - 105 -                      Index
  6492.  
  6493.  
  6494.     defmark                                       25 100
  6495.     defmodes                                       25 _6_3
  6496.     defmodestring                                 25 100
  6497.     defset                                            25
  6498.     defvar                                         25 25
  6499.     delete buffer                                  6 100
  6500.     delete                                            25
  6501.     delete-line                                   12 100
  6502.     delete-mode-autosave                   25 25 100 101
  6503.     delete-mode-echo                                  24
  6504.     delete-mode-full-shift                            22
  6505.     delete-mode-hash-shift                            23
  6506.     delete-mode-no-parse                          25 101
  6507.     delete-mode-overwrite                         23 101
  6508.     delete-mode-position                              22
  6509.     delete-mode-regular-expression                    23
  6510.     delete-mode-time                               24 25
  6511.     delete-mode-verbose                               24
  6512.     delete-mode-view                              23 101
  6513.     delete-previous-character                 6 12 14 25
  6514.     demand-load not                                   25
  6515.     demand-load                                 25 25 _6_4
  6516.     describe-bindings                                 20
  6517.     describe-fold                                     22
  6518.     directory                                      5 101
  6519.     diredit-long                                      25
  6520.     DirView                                        5 101
  6521.     display area                                   25 69
  6522.     display                                         4 25
  6523.     div                                               25
  6524.     do                                                25
  6525.     double-line                                       13
  6526.     DV                                             5 101
  6527.  
  6528.     echo-byte                                         25
  6529.     echo-string                                       25
  6530.     Editing                                           12
  6531.     editor files                              9 10 15 16
  6532.     else                                              25
  6533.     end-of-fold                                        9
  6534.     end-of-line                                      6 9
  6535.     end-prompt-macro                               25 25
  6536.     enter-fold                                         9
  6537.     enter-list-file                                   17
  6538.     error                                             25
  6539.     error-list                                        25
  6540.     esac                                              25
  6541.     eval                                           25 25
  6542.     execute-macro                                     18
  6543.     execute-number-macro                              18
  6544.     exit                                              25
  6545.     exit-buffer                                       25
  6546.     exit-fold                                         10
  6547.  
  6548.  
  6549.  
  6550.  
  6551. Origami 1.6.92            - 105 -               October 1993
  6552.  
  6553.  
  6554.  
  6555.  
  6556.  
  6557. User Guide                - 106 -                      Index
  6558.  
  6559.  
  6560.     F                                              5 101
  6561.     false                                          25 25
  6562.     fi                                          25 _6_1 _6_2
  6563.     file                                            6 25
  6564.     file-number                                       25
  6565.     file-type                                         25
  6566.     filed fold                                     25 _6_2
  6567.     Filed folds and libraries                         25
  6568.     filename-completion                          6 19 25
  6569.     Files                                             15
  6570.     Fill paragraph                                    25
  6571.     filter-buffer                                  17 25
  6572.     filter-line                                       13
  6573.     fold-comment-end                                  25
  6574.     fold-comment-end-length                           25
  6575.     fold-comment-start                                25
  6576.     fold-comment-start-length                         25
  6577.     fold-mark-begin                                   25
  6578.     fold-mark-end                                     25
  6579.     fold-mark-file                                    25
  6580.     fold-mark-line                                    25
  6581.     folding                                      5 7 _7 9
  6582.                                                  100 101
  6583.     force-bourne-shell                                25
  6584.     forward                                        25 25
  6585.     forward-character                             6 9 14
  6586.     full-shift-mode                                22 22
  6587.     function                                25 25 _2_5 100
  6588.     Functions and macros                              25
  6589.  
  6590.     get-history                                    25 25
  6591.     Getting Started                                    4
  6592.     global integer arrays                             25
  6593.     global integer variables                          25
  6594.     Goto matching fence                               60
  6595.     goto                                              25
  6596.     goto-buffer-id                                    25
  6597.     goto-buffer-number                                25
  6598.     goto-counter                                      25
  6599.     goto-line                                          9
  6600.     goto-line-counter                              25 25
  6601.     goto-line-mark                                 25 25
  6602.     grow-buffer                                       20
  6603.  
  6604.     hash-shift-mode                           5 23 23 25
  6605.     help                                           21 25
  6606.     hex                                                4
  6607.     high-bit                                           4
  6608.     history                                  6 25 25 100
  6609.     history-edit                                   25 25
  6610.     history-edit-filename                             25
  6611.     history-edit-line                                 25
  6612.     history-name                                      25
  6613.     HOME                                       20 21 100
  6614.  
  6615.  
  6616.  
  6617. Origami 1.6.92            - 106 -               October 1993
  6618.  
  6619.  
  6620.  
  6621.  
  6622.  
  6623. User Guide                - 107 -                      Index
  6624.  
  6625.  
  6626.     How to get out                                    25
  6627.  
  6628.     if                                                25
  6629.     if-using                                    25 _6_1 _6_2
  6630.     in-prompt                                         25
  6631.     include                                     25 25 _6_2
  6632.     incremental-search                                14
  6633.     incremental-search-forward                        14
  6634.     incremental-search-reverse                     14 15
  6635.     Index                                            102
  6636.     initfun                                           25
  6637.     Inmos Files                                        8
  6638.     Inmos                                         7 8 _2_5
  6639.     insert-ascii                                      25
  6640.     insert-file                                       17
  6641.     insert-folded-kill-buffer                         13
  6642.     integer                                           25
  6643.  
  6644.     kbdlibpath                                    25 101
  6645.     key-count                                         25
  6646.     key-not-bound-macro                            25 25
  6647.     keybind                                  25 25 _2_5 _6_3
  6648.                                                      100
  6649.     keyboards                                         25
  6650.     keysequence                                   25 100
  6651.     kill buffer                                        6
  6652.     kill-count                                        25
  6653.     kill-line                                         13
  6654.     KNBM                                              25
  6655.  
  6656.     language                                 5 21 25 100
  6657.     last-message                                      25
  6658.     lib                                            25 _6_2
  6659.     libraries                                25 _6_1 62 _6_2
  6660.     line                                              25
  6661.     line-limiter                                      25
  6662.     linelength                                       4 5
  6663.     Lisp                                               7
  6664.     load-function not                              25 _6_4
  6665.     load-function                                  25 25
  6666.     local                                             25
  6667.     long status line                                   5
  6668.     long statusline                                   25
  6669.  
  6670.     M-                                             25 _2_5
  6671.     M-C-                                              25
  6672.     Ma                                                 5
  6673.     macro                                    18 25 25 _2_5
  6674.                                                  100 101
  6675.     Macros                                            18
  6676.     Magic                                              5
  6677.     mark                                      7 17 25 _7_1
  6678.     match                                           5 25
  6679.     menu-counter                                   25 69
  6680.  
  6681.  
  6682.  
  6683. Origami 1.6.92            - 107 -               October 1993
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689. User Guide                - 108 -                      Index
  6690.  
  6691.  
  6692.     message                                        25 25
  6693.     message-exit                                      25
  6694.     message-string                                 25 25
  6695.     Messages                                          79
  6696.     MGR                                            68 69
  6697.     misc                                            6 25
  6698.     Miscellaneous                                     71
  6699.     mode                                           25 _6_3
  6700.     mode-limiter                                      25
  6701.     Modes and terminals                               62
  6702.     modes                                        5 22 25
  6703.     modify-behaviour                         10 15 16 20
  6704.                                              21 25 25 _6_4
  6705.     modulo                                            25
  6706.     Mouse extension                                   68
  6707.     mouse                                             68
  6708.     mouse-b                                           69
  6709.     mouse-buffer-number                               69
  6710.     mouse-buttons                                     69
  6711.     mouse-go-y                                        69
  6712.     mouse-outside                                     69
  6713.     mouse-x                                           69
  6714.     mouse-y                                           69
  6715.     move buffer                                        6
  6716.     move-count                                        25
  6717.     move-line                                         13
  6718.     Moving around                                      9
  6719.     MTool-version of top-of-fold                      25
  6720.     multi-edit                                     16 25
  6721.     Multiple keyboard modes                           25
  6722.     Multiple Mouse supports                           69
  6723.  
  6724.     Name and command line options                     25
  6725.     name                                          25 100
  6726.     narrow-buffer                                     20
  6727.     newline-and-indent                        6 13 14 20
  6728.                                                       25
  6729.     next-line                                     6 9 14
  6730.     next-page                                          9
  6731.     no-match                                        5 25
  6732.     no-mouse                                          69
  6733.     no-operation                                      25
  6734.     no-parse-mode                               5 25 101
  6735.     none                                            7 25
  6736.     NoParse                                        5 101
  6737.     not                                         25 25 _6_1
  6738.     NP                                             5 101
  6739.     null character                                     4
  6740.  
  6741.     O                                              5 101
  6742.     Occam                                              7
  6743.     OCL examples                                      25
  6744.     OCL syntax and semantics                          25
  6745.     OCL                                               25
  6746.  
  6747.  
  6748.  
  6749. Origami 1.6.92            - 108 -               October 1993
  6750.  
  6751.  
  6752.  
  6753.  
  6754.  
  6755. User Guide                - 109 -                      Index
  6756.  
  6757.  
  6758.     ocl-arg-field                                 25 100
  6759.     ocl-argument                             19 22 23 24
  6760.                                                 25 25 _6_4
  6761.     OCL-assembler                                     83
  6762.     octal                                              4
  6763.     open-adjacent-buffer                           16 25
  6764.     open-buffer                                    15 25
  6765.     open-fold                                          9
  6766.     open-list-adjacent-buffer                      16 25
  6767.     open-list-buffer                               16 25
  6768.     or                                                25
  6769.     origami functions                                  9
  6770.     origami-message                                   25
  6771.     ORIGAMIFILE                              13 17 18 19
  6772.     origamihelp                                21 25 100
  6773.     ORIGAMILINE                              13 17 18 19
  6774.     origamimsg                              25 25 79 101
  6775.     origamipath                                   25 101
  6776.     origamirc                               20 21 25 100
  6777.     ORIGAMIWORD                              13 17 18 19
  6778.     ORIGAMIX                                 13 17 18 19
  6779.     ORIGAMIY                                 13 17 18 19
  6780.     os-extension                                      25
  6781.     Other marks for folds                             25
  6782.     Over                                           5 101
  6783.     overload-prefix                                   25
  6784.     overwrite-mode                           5 23 25 101
  6785.  
  6786.     parameter variables                               25
  6787.     Pascal                                             7
  6788.     path                                              25
  6789.     path-separator                                    25
  6790.     pick buffer                                        6
  6791.     pipe-from-command                              18 25
  6792.     pipe-to-command                                18 25
  6793.     pop-delete-buffer                                 25
  6794.     PPID                                     13 17 18 19
  6795.     pre                                               25
  6796.     prefix                                            25
  6797.     previous-line                                 6 9 14
  6798.     previous-page                                      9
  6799.     Processing Origami Files                        7 25
  6800.     Programming in OCL                                25
  6801.     prompt                                          6 25
  6802.     prompt-char-counter                               25
  6803.     prompt-counter                                    25
  6804.  
  6805.     query-replace-string                              14
  6806.     quote-character                                   19
  6807.  
  6808.     rc-comment                                        25
  6809.     RCS                                               _2_5
  6810.     read-file                                         15
  6811.     read-list-file                                    16
  6812.  
  6813.  
  6814.  
  6815. Origami 1.6.92            - 109 -               October 1993
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821. User Guide                - 110 -                      Index
  6822.  
  6823.  
  6824.     read-newfile--macro                               _6_4
  6825.     read-newfile-macro                             25 25
  6826.     read-repeat                                       25
  6827.     redraw-display                                 19 25
  6828.     reference-begin                                   25
  6829.     reference-begin-class                          21 25
  6830.     reference-end                                     25
  6831.     references                                        25
  6832.     refresh-line                                      25
  6833.     Regular expressions                               75
  6834.     Regular replace expressions                       77
  6835.     Regular search expressions                        75
  6836.     regular                                  5 14 23 100
  6837.     repeat                                            25
  6838.     replace                                         6 25
  6839.     replace-string                                    14
  6840.     reset-user-mode                                   25
  6841.     Resource files                                    25
  6842.     restore-buffer-layout                             25
  6843.     return-from-macro                              25 25
  6844.     return-value-from-macro                        25 25
  6845.     Revision control system                           25
  6846.     Roff                                               7
  6847.  
  6848.     S                                              5 101
  6849.     save-and-exit-buffer                              25
  6850.     save-and-exit-buffer-code                         25
  6851.     save-buffer-layout                             25 25
  6852.     save-file                                         17
  6853.     save-keyboard-macro                               18
  6854.     screen                                             5
  6855.     screen-height                                     25
  6856.     screen-height-offset                              25
  6857.     screen-off                                     25 25
  6858.     screen-on                                      25 25
  6859.     screen-width                                      25
  6860.     screen-width-offset                               25
  6861.     Script                                             7
  6862.     Search and replace                                14
  6863.     search                                          6 25
  6864.     search-forward                                 14 14
  6865.     search-reverse                                 14 14
  6866.     set                                            25 75
  6867.     set-area                                          25
  6868.     set-argument                                   19 25
  6869.     set-counter                                       25
  6870.     set-cursor-line                                   25
  6871.     set-display-mode                               25 25
  6872.     set-enter                                         25
  6873.     set-file-unchanged                                22
  6874.     set-language                               21 69 100
  6875.     set-numbered-user-mode                            25
  6876.     set-space-enter                                   25
  6877.     set-user-mode                                     25
  6878.  
  6879.  
  6880.  
  6881. Origami 1.6.92            - 110 -               October 1993
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887. User Guide                - 111 -                      Index
  6888.  
  6889.  
  6890.     Shell commands                                    19
  6891.     shell                                     6 19 19 25
  6892.                                                   25 100
  6893.     shell-command                               19 25 _2_5
  6894.     shift-mark                                        25
  6895.     show-cursor                                       25
  6896.     shrink-buffer                                     20
  6897.     sigquit-macro                                  25 25
  6898.     sigusr1-macro                                  25 25
  6899.     sigusr2-macro                                  25 25
  6900.     space                                            4 8
  6901.     Special commands                                  25
  6902.     Special functions                                 19
  6903.     start-list-editing                                25
  6904.     status line                               5 6 25 100
  6905.                                                      101
  6906.     status-line-off                                   25
  6907.     status-line-on                                 25 25
  6908.     statusline                                        25
  6909.     store-character                                 6 25
  6910.     store-line                                        25
  6911.     store-line-mark                                25 25
  6912.     store-pos                                         25
  6913.     suspend-origami                                   19
  6914.     Syntax                                            83
  6915.  
  6916.     tab                                             4 25
  6917.     TDS                                         6 8 9 11
  6918.                                             13 25 _2_5 100
  6919.     term                                       25 25 100
  6920.     termalias                                         25
  6921.     terminal                                    25 25 _6_3
  6922.     Terminals                                         25
  6923.     Terms                                             25
  6924.     test-autosave                                     25
  6925.     test-begin-fold                                   25
  6926.     test-begin-line                                 6 25
  6927.     test-bottom                                       25
  6928.     test-char                                       6 25
  6929.     test-char-greater                               6 25
  6930.     test-char-less                                  6 25
  6931.     test-char-set                                   6 25
  6932.     test-echo                                         25
  6933.     test-end-fold                                     25
  6934.     test-end-line                                   6 25
  6935.     test-file-changed                                 25
  6936.     test-filed                                        25
  6937.     test-fold-line                                    25
  6938.     test-folding                                      25
  6939.     test-hash-shift                                   25
  6940.     test-language                                     25
  6941.     test-overwrite                                    25
  6942.     test-str                                        6 25
  6943.     test-term                                      25 _6_4
  6944.  
  6945.  
  6946.  
  6947. Origami 1.6.92            - 111 -               October 1993
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953. User Guide                - 112 -                      Index
  6954.  
  6955.  
  6956.     test-text                                         25
  6957.     test-top                                          25
  6958.     test-verbose                                      25
  6959.     test-view                                         25
  6960.     TeX                                                7
  6961.     The display area                                  25
  6962.     The Screen Format                                  5
  6963.     The Special Editor Buffers                         6
  6964.     The towers of hanoi                               61
  6965.     toggle-attach-file-to-fold                        12
  6966.     toggle-file-fold                                  11
  6967.     transputer                                         8
  6968.     true                                           25 25
  6969.  
  6970.     undeclare                                   25 25 _2_5
  6971.     undo-delete-character                           6 13
  6972.     undo-delete-line                                  12
  6973.     unfold-fold                                       10
  6974.     use                                            25 _6_1
  6975.     used-buffers                                      25
  6976.     User defined modes                                25
  6977.     User                                            7 25
  6978.     usermacros                                        25
  6979.     Using Origami                                      4
  6980.     Using the mouse in OCL                            69
  6981.  
  6982.     V                                              5 101
  6983.     Variable Initialization                           25
  6984.     Variable statements                               25
  6985.     variable                                       25 25
  6986.     Variables Types                                   25
  6987.     Variables Usage                                   25
  6988.     verbose                                        24 25
  6989.     View                                           5 101
  6990.     view-macro                                     25 25
  6991.     view-mode                                 5 23 25 _2_5
  6992.                                                   85 101
  6993.     visible-bell                                      25
  6994.  
  6995.     while                                             25
  6996.     widen-buffer                                      20
  6997.     write-area                                        25
  6998.     write-file                                        17
  6999.  
  7000.     X and MGR together                                69
  7001.     X                                              68 69
  7002.     XM                                                 5
  7003.     XMagic                                             5
  7004.     xterm                                          68 69
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013. Origami 1.6.92            - 112 -               October 1993
  7014.  
  7015.  
  7016.